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

            Bug ID: 89805
           Summary: Not accurate line number -Werror=unused-macros
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jg at jguk dot org
  Target Milestone: ---

Godbolt trunk

should show line number of the macro, not the end of the file.

Expected:
<source>:1:1: error: macro "DISPLAY_SLEEPS" is not used [-Werror=unused-macros]

Actual:
<source>:6:1: error: macro "DISPLAY_SLEEPS" is not used [-Werror=unused-macros]


Full log below.

Clang has accurate line number BTW.



x86-64 gcc (trunk)
#1 with x86-64 gcc (trunk)
<source>:6:1: error: macro "DISPLAY_SLEEPS" is not used [-Werror=unused-macros]

    6 | }

      | ^

cc1plus: some warnings being treated as errors

Compiler returned: 1


#define DISPLAY_SLEEPS 0

int main(void)
{
 return 0;
}

Reply via email to