https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92390

            Bug ID: 92390
           Summary: Preprocessor reports 'missing terminating " character'
                    warning despite #if 0
           Product: gcc
           Version: 6.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: victor.morales_cayu...@nokia-sbell.com
  Target Milestone: ---

Preprocessor does not ignore invalid #if blocks. As in this example:

  1 int main()
  2 {
  3  #if 0
  4  std::cout << "
  5  #endif
  6 }

Compiler (with or without -Wall -Wextra) shows:

   file.cpp:4:15: warning: missing terminating " character

This bug was reported in version 3.3.3
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15688) and was not solved because
that character was not considered a token, condition necessary even inside
commented blocks.

That bug was reported in 2004 and after *15 years* it has not been solved yet.
Please reconsider regarding it as a bug.

Reply via email to