[Bug c/50668] New: gcc gives warnings for code with #if 0 .... #endif code block

jg at jguk dot org gcc-bugzilla@gcc.gnu.org
Sat Oct 8 22:07:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50668

             Bug #: 50668
           Summary: gcc gives warnings for code with #if 0 .... #endif
                    code block
    Classification: Unclassified
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jg@jguk.org


A little surprised to see the following build warning for code withn #if 0 ....
#endif I had expected that to be excluded from the build.

main3.c:4:3: warning: missing terminating " character

gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2

gcc -Wall -o main main3.c

My sample program follows:


#if 0
p("
#endif

int main(void)
{
    return 0;
}



More information about the Gcc-bugs mailing list