This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Comment delimiter in string


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)
----------------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]