c++/9120: [3.4 regression] miscompilation of function with references to undeclared objects and functions
Giovanni Bajo
giovannibajo@libero.it
Thu May 1 01:02:00 GMT 2003
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9120
The patch by Mark in this audit trail is actually for pr/9099.
Now, I wonder if the code is legal at all. I'm not sure an implementation is
_forced_ to parse a() at instantiation time even in non-dependent
expressions. GCC 3.4 now refuses this code complaining that cerr/endl are
unknown. Comeau even complains that "std" is not a namespace name (yet),
when compiling in strict mode. On the other hand, VC71 and Comeau relaxed
(and all GCC versions before 3.4) accept the code.
Thus, I can't reproduce the wrong-code regression anymore.
If some language lawyer confirms my analysis, we can probably close this PR.
Giovanni Bajo
More information about the Gcc-bugs
mailing list