[Bug c/63612] #pragma breaks if...else
q.gcc@rsn-tech.co.uk
gcc-bugzilla@gcc.gnu.org
Wed Oct 22 09:25:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63612
--- Comment #6 from steveren <q.gcc@rsn-tech.co.uk> ---
(In reply to Dietmar Schindler from comment #5)
> In news:comp.std.c there is a thread "#pragma are considered statements" -
> https://groups.google.com/forum/#!topic/comp.std.c/A1rhyQ5zB7g/discussion -
Thanks Dietmar.
Seems the consensus is that it's not contrary to Standard, but it's agreed to
be confusing and undesirable by everyone except the gcc maintainers :-)
FWIW, the actual context in which I found the behaviour was this:
if (whatever...)
{
stuff...
}
#ifdef FOO
#pragma message ("QUICK AND DIRTY HACK!!!")
else if (special case...)
{
other stuff...
}
#endif // FOO
I'll take a lot of persuading that this isn't a reasonable thing to want to do.
(Flagging the nasty, that is; purists who say you should never /do/ anything
you need to warn people about need not apply :-) )
More information about the Gcc-bugs
mailing list