This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling GCC With a C++ Compiler (g++)
Gabriel Dos Reis <gdr@cs.tamu.edu> writes:
> Assume you can modify *s, then you still don't get anything useful
> from Geoff's change, because the string could be modified anyway.
> Therefore the "const" is there only to damage work done in the
> direction of being able to compile GCC source with a C++ compiler.
If C++ has a stricter meaning for const than C then we need to adhere to
this stricter meaning when we want to compile with a C++ compiler. But
that isn't the point I tried to make, I was only disputing the claim that
Geoff's change introduces undefined behaviour in C.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."