From: Gaius Mulley Date: Wed, 31 Jan 2024 15:51:49 +0000 (+0000) Subject: modula2: tidyup patch X-Git-Tag: basepoints/gcc-15~1475 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcf579cb61bc2eb474fd824c19003d2dc17ec24f;p=thirdparty%2Fgcc.git modula2: tidyup patch This patch improves a comment and also adds the location tokenno to possibly exported idents as they are encountered. gcc/m2/ChangeLog: * gm2-compiler/M2Comp.mod (Pass0CheckMod): Tidy up comment. * gm2-compiler/P1Build.bnf (PossiblyExportIdent): Replace PushTF with PushTFtok. Signed-off-by: Gaius Mulley --- diff --git a/gcc/m2/gm2-compiler/M2Comp.mod b/gcc/m2/gm2-compiler/M2Comp.mod index 48ea7b7ed41e..a97f0edd648d 100644 --- a/gcc/m2/gm2-compiler/M2Comp.mod +++ b/gcc/m2/gm2-compiler/M2Comp.mod @@ -872,8 +872,8 @@ BEGIN IF NOT IsDefinitionForC (sym) THEN (* The implementation module is only useful if -fgen-module-list= is - used (to gather all dependencies) although we do not insist upon finding the - implementation module. *) + used (to gather all dependencies). Note that we do not insist + upon finding the implementation module. *) LibName := NIL ; IF FindSourceModFile (SymName, FileName, LibName) THEN diff --git a/gcc/m2/gm2-compiler/P1Build.bnf b/gcc/m2/gm2-compiler/P1Build.bnf index 5d7254fde906..a3534fcb84d2 100644 --- a/gcc/m2/gm2-compiler/P1Build.bnf +++ b/gcc/m2/gm2-compiler/P1Build.bnf @@ -374,7 +374,7 @@ VAR nothing: CARDINAL ; BEGIN AddNameToScope(makekey(currentstring)) ; - PushTF(makekey(currentstring), identtok) ; + PushTFtok(makekey(currentstring), identtok, GetTokenNo()) ; CheckExplicitExported ; IF NOT IsAutoPushOn() THEN