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

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Azat from comment #5)
> > Whether the correct behavior is that the system_header applies to the
> > definition or to the expansion location, I am not sure. However, the bad
> > location of the C FE is clearly a bug.
> 
> Maybe gcc will behave like clang in this case?

How does Clang behave? For example, what happens when you don't use
system_header in your testcase? and when you use it, but also add
-Wsystem-headers? What happens if the system_header #pragma is moved to c.h?
Trying to guess a correct behavior from a single testcase is quite hard. Clang
may "work" in this case, but may "fail" in another case..

My intuition is that whether the warning is printed or not depends on the way
the macro unwinder works. We have an open bug about that already PR55252, but
no one has tried to change it yet.

Reply via email to