From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23814 invoked by alias); 8 Jun 2008 01:41:46 -0000 Received: (qmail 23739 invoked by uid 48); 8 Jun 2008 01:41:03 -0000 Date: Sun, 08 Jun 2008 01:41:00 -0000 Message-ID: <20080608014103.23738.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/27941] offsetof produces possibly erroneous warnings In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tristan_schmelcher at alumni dot uwaterloo dot ca" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00444.txt.bz2 ------- 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