https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41517

Jan Echternach <jan.echternach at de dot gbs.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.echternach at de dot 
gbs.com

--- Comment #1 from Jan Echternach <jan.echternach at de dot gbs.com> ---
I can confirm this bug in gcc 4.9 (Debian 4.9.2-10). A different example which
also produces wrong code (should return 0, but returns 1):

//#include <stdio.h>
int main ()
{
    if (0)
#pragma GCC diagnostic ignored "-Wtype-limits"
    {
        //printf ("bug\n");
        return 1;
    }
    //printf ("ok\n");
    return 0;
}

And an example that fails to compile ("error: ‘else’ without a previous ‘if’"):

void foo (void)
{
    if (0)
#pragma GCC diagnostic ignored "-Wtype-limits"
    {}
    else {}
}

Reply via email to