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/63612] #pragma breaks if...else


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 :-) )


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