[Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"

magnus.reftel at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Apr 12 07:42:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56824

--- Comment #4 from Magnus Reftel <magnus.reftel at gmail dot com> 2013-04-12 07:42:50 UTC ---
Thanks for working on this!

While the change (when applied to 4.8 as released) does make the erroneous
print go away, it makes gcc hang with 100% CPU usage if the "diagnostic
ignored" is commented out, like so:

/* gcc -Waggregate-return -c aggregate-return.c */
struct foo { int i;};
struct foo aggregate_return(void);
#pragma GCC diagnostic push
/*#pragma GCC diagnostic ignored "-Waggregate-return"*/
int main(int argc, char* argv[])
{
        aggregate_return();
        return 0;
}
#pragma GCC diagnostic pop



More information about the Gcc-bugs mailing list