https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105388

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Thanks for the patch - ah yes the list of C functions/macros/reserved words to
be avoided needed to be extended.

The list of reserved words/functions/macros to be avoided in mc are contained
in:
gcc/m2/mc/keyc.mod


diff --git a/gcc/m2/mc/keyc.mod b/gcc/m2/mc/keyc.mod
index 2cf06790d93..a6584f49a9f 100644
--- a/gcc/m2/mc/keyc.mod
+++ b/gcc/m2/mc/keyc.mod
@@ -1033,6 +1033,7 @@ BEGIN
    add (macros, 'cos') ;
    add (macros, 'tan') ;
    add (macros, 'log10') ;
+   add (macros, 'trunc') ;
    add (macros, 'I') ;
    add (macros, 'csqrt') ;
    add (macros, 'strlen') ;

to recreate the C version of mc - which updates the C version of mc in the
source tree you can perform:

cd build-devel-modula2-enabled    # your build directory
cd gcc
export PATH=$HOME/opt/bin:$PATH   # the install bin for the current gm2
make mc-help
make mc-maintainer                # builds a new C version of mc (checking
                                  # that the C and m2 versions produce the
                                  # same output.
make mc-verify                    # and double check that the new version from 
                                  # the source tree builds
                                  # cleanly and produces the same output.


I've added the patch above, remade mc on the gcc-12 branch and re-tested
building gcc from bootstrap on amd64.

Reply via email to