Warning

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, all!

Regarding the following warning type...

warning: dereferencing type-punned pointer will break strict-aliasing rules

Ex1:   object_array list;
       thing_array *things;
       -thing_array = (thing_array *)&list;
       +thing_array *things  = (thing_array *)(void *)&list;

Ex2:   char_array audience;
       thing_array var_list;
       var_list = (thing_array&)audience;

- From google'ing I found the work-a-round for Ex1 to remove the above
warning, however I am having a hard time understanding how it relates to
Ex2?  Any help would be appreciated.  It is legacy code that I am
attempting to fix.

J
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIKJWRqFwmN5yaqkwRAgXhAKCfwD4A8r/Fu2BOfECrEqBpy3lDqQCfQBv0
xRmw0Qvji+Go4YsV4S8ZUPo=
=Me2Y
-----END PGP SIGNATURE-----


[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