mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 16:33:19 +00:00
Improved error message on initializing extern variables inside functions.
This commit is contained in:
parent
b62b1650f5
commit
bde5be6793
@ -493,7 +493,10 @@ static void ParseOneDecl (const DeclSpec* Spec)
|
||||
if ((Decl.StorageClass & SC_EXTERN) == SC_EXTERN) {
|
||||
/* External identifier - may not get initialized */
|
||||
if (CurTok.Tok == TOK_ASSIGN) {
|
||||
Error ("Cannot initialize externals");
|
||||
Error ("Cannot initialize extern variable '%s'", Decl.Ident);
|
||||
/* Avoid excess errors */
|
||||
NextToken ();
|
||||
ParseInit (Decl.Type);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user