This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32041] New: offsetof buglet
- From: "neil at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 May 2007 14:00:13 -0000
- Subject: [Bug c/32041] New: offsetof buglet
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC seems to have taken the view that compound expressions are permitted as the
2nd argument to offsetof. However the implementor of the grammar forgot that
-> could be used.
#include <stddef.h>
struct s
{
struct { float f; } sa[2];
};
enum { e = offsetof (struct s, sa->f) };
--
Summary: offsetof buglet
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neil at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32041