[Bug preprocessor/48839] #error should terminate compilation - similar to missing #include
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 21 04:10:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48839
--- Comment #9 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #8)
> Hi. As you can see, the patch itself seems simple, but a while ago I noticed
> that quite a few testcases would need adjusting and that made me a little
> nervous. In particular those testcases (both C and C++) which are doing more
> than one check and would have to be split, because the compilation ends
> after the first #error.
Which testcases are these?
> Anyway, probably that's just boring work to do, what about the other compilers?
> For sure some are following the current gcc behaviour, for compatibility, I
> suspect ICC for example. Should we also have a command line switch? Probably
> missing #includes just unconditionally end the compilation on most compilers,
> though. Well, it's also true that the so called workaround which I mentioned in
> Comment #1 works pretty well and we do have *very* few fatal errors in the
> front ends...
More information about the Gcc-bugs
mailing list