This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27941] offsetof produces possibly erroneous warnings
- From: "tristan_schmelcher at alumni dot uwaterloo dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2008 01:41:03 -0000
- Subject: [Bug c++/27941] offsetof produces possibly erroneous warnings
- References: <bug-27941-12798@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from tristan_schmelcher at alumni dot uwaterloo dot ca 2008-06-08 01:41 -------
Just a note for posterity:
Using offsetof in this particular case (and many others) will work in G++, but
the standard doesn't require that, so in theory it's not portable. That's why
G++ prints a warning. You can suppress it with -Wno-invalid-offsetof.
--
tristan_schmelcher at alumni dot uwaterloo dot ca changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tristan_schmelcher at alumni
| |dot uwaterloo dot ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27941