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

            Bug ID: 126172
           Summary: -Wmismatched-dealloc warning inhibited by preprocessor
                    line numbers
           Product: gcc
           Version: 16.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bruno at clisp dot org
  Target Milestone: ---

Created attachment 64969
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64969&action=edit
test case bug.c

Warnings about semantics or code generation should not be inhibited by
preprocessor line statements. But that is what happens for -Wmismatched-dealloc
warnings.

How to reproduce:

1)
$ gcc -Wall -Wmismatched-dealloc -O2 -S bug.c
Actual output: warnings about line 22, 36, 42.
Expected output: warnings about line 22, 31, 36, 42.

2)
$ gcc -O2 -E bug.c | sed -e '/^#/d' > bug1.c
$ gcc -Wall -Wmismatched-dealloc -O2 -S bug1.c
Actual output: warnings about line 22, 29, 36, 42.

Reply via email to