This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Comment delimiter in string
Stephan Schulz <schulz@informatik.tu-muenchen.de> writes:
> I think I found a bug in the string/comment handling of egcs 1.0.1.
This is not a bug, the behavior is correct.
> /* fprintf(stdout, "/* %s */", 1 ? "Maximal" : "Not!"); */
This is interpreted as:
", 1 ? "Maximal" : "Not!"); */
which is clearly in error. Comments do not nest in ANSI/ISO C, AFAIK
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil