This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/85153] _Pragma to disable -Wswitch-unreachable diagnostic not properly working when used within preprocessor macro


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

--- Comment #4 from Fabio Alemagna <falemagn at gmail dot com> ---
@(In reply to Richard Biener from comment #3)
> Confirmed.  Not sure what the exact limit is but some of the warnings can
> only be disabled at function granularity and placing the pragmas in macros
> might interfere with this.

But the preprocessed output shows the #pragma's all at the expected place and
compiling the preprocessed output works as expected.

I only ever delved into gcc's innards in one of its old releases and don't know
if anything has changed meanwhile about this, but afaik the compiler always
works on the preprocessed output, and if this still holds true, how can it be
explained that invoking g++ on the un-preprocessed output produces a different
result than invoking it on the preprocessed output?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]