[Bug c/17070] New: unnecessary quote check by preprocessor
tosa at nmr dot mgh dot harvard dot edu
gcc-bugzilla@gcc.gnu.org
Tue Aug 17 22:17:00 GMT 2004
I get the following error:
minerva:/home/ytosa/c>gcc -g -o multiline multiline.c
multiline.c:13:10: missing terminating " character
multiline.c:16:5: missing terminating " character
(see the code at the end).
I thought that using the preprocessor making it safe to
use the multiline text for gcc < 3.3.x.
But it makes it broken under gcc 3.3.3.
Actually, the preprocessor does the correct thing except
the quotes. -E produced the following:
int main(int argc, char *argv[])
multiline.c:13:10: missing terminating " character
multiline.c:16:5: missing terminating " character
{
printf("No multiline allowed\n");
return 0;
}
------------------------------- starts here
#include <stdio.h>
#ifdef __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#endif
int main(int argc, char *argv[])
{
#if GCC_VERSION < 30300
printf(
"
Multiline text1
Multiline text2
\n");
#else
printf("No multiline allowed\n");
#endif
return 0;
}
------------------------------------- end here
--
Summary: unnecessary quote check by preprocessor
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tosa at nmr dot mgh dot harvard dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17070
More information about the Gcc-bugs
mailing list