This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/63612] #pragma breaks if...else
- From: "q dot gcc at rsn-tech dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Oct 2014 09:24:26 +0000
- Subject: [Bug c/63612] #pragma breaks if...else
- Auto-submitted: auto-generated
- References: <bug-63612-4 at http dot gcc dot gnu dot org/bugzilla/>
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 :-) )