warning: unknown escape sequence

Soubhik Bhattacharya soubhik@cse.iitk.ac.in
Fri May 25 22:02:00 GMT 2001


hi!!
i'm a mortal user of GCC and not very happy about a particular feature of
it...
i have a c proggy, which generates a c header file. the output file
contains some comments. so i had the sequences "/*" and "*/" in the
fprintf format strings of my program. now this is a problem bcoz as i try
to comment out a portion of my code, the comment terminates prematurely
at the point where there's a "*/" in the format string. to get around the
problem, i've replaced "*/" with "\*\/" in the format strings. so the
original problem's gone, but alas, as i compile with -Wall, i see a page
full of warnings--
 warning: unknown escape sequence `\*'
 warning: unknown escape sequence `\/'
i just hate these warnings. is this warning desirable? is it possible to
write the code in a better way so as to avoid these warning? and if yes,
how???

TIA,
soubhik.



More information about the Gcc mailing list