[gcc r14-8664] modula2: tidyup patch

Gaius Mulley gaius@gcc.gnu.org
Wed Jan 31 15:52:31 GMT 2024


https://gcc.gnu.org/g:dcf579cb61bc2eb474fd824c19003d2dc17ec24f

commit r14-8664-gdcf579cb61bc2eb474fd824c19003d2dc17ec24f
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Wed Jan 31 15:51:49 2024 +0000

    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 <gaiusmod2@gmail.com>

Diff:
---
 gcc/m2/gm2-compiler/M2Comp.mod  | 4 ++--
 gcc/m2/gm2-compiler/P1Build.bnf | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

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


More information about the Gcc-cvs mailing list