Re: bug with -O2 in g++ Debian 4.0.2-9 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jerome Robert writes:
 >  Is this program wrong

Yes.

See ISO C9899:199 Section 6.3.2.3.  

These lines are particularly bogus:

    void ** aa=(void **)(void *)&a;
    void ** ab=(void **)(void *)&b;

All the cast to (void *) does is suppress a useful warning.

-fno-strict-aliasing may help.

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux