Comment delimiter in string
Stephan Schulz
schulz@informatik.tu-muenchen.de
Fri Jun 5 07:55:00 GMT 1998
Hi,
I think I found a bug in the string/comment handling of egcs 1.0.1. I
found no report about it in the list archives, so perhaps is still in
the current release...
schulz@sunjessen39 1:40pm [BIB] gcc -v
Reading specs from /usr/local/dist/DIR/egcs-1.0.1-sol26/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
------------------
#include <stdio.h>
int main(int argc, char* argv[])
{
/* fprintf(stdout, "/* %s */", 1 ? "Maximal" : "Not!"); */
exit (0);
}
-------------------
gcc test.c
tcsh: using dumb terminal settings.
test.c:5: unterminated string or character constant
test.c:5: possible real start of unterminated constant
The companion without comments compiles fine:
---
#include <stdio.h>
int main(int argc, char* argv[])
{
fprintf(stdout, "/* %s */", 1 ? "Maximal" : "Not!");
exit (0);
}
Yours,
Stephan
-------------------------- It can be done! ---------------------------------
Please email me as schulz@informatik.tu-muenchen.de (Stephan Schulz)
----------------------------------------------------------------------------
More information about the Gcc-bugs
mailing list