https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #6)
> (In reply to Nathan Sidwell from comment #2)
> > stupid underspecified offsetof
> 
> Is this related to bug 65254?

Is that a bug?
Looking at both C and C++, offsetof seems underspecified, it doesn't say what
exactly the member-designator is or can be.
C talks about
static type t;
and
&(t.member-designator)
but one can put there say foo.bar.baz or qux[2].corge in that expression.
C++ defers mostly to the C standard, and if type is say
struct S { int s; };
then in C++ with
static S t;
the following
&(t.S::s)
is valid expression and S::s designates the member.
So it is unclear on what makes clang think that anything but an identifier as
member-designator is non-standard.

Reply via email to