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

Eric Gallager <egall at gwmail dot gwu.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egall at gwmail dot gwu.edu

--- Comment #1 from Eric Gallager <egall at gwmail dot gwu.edu> ---
(In reply to Jack Howarth from comment #0)
> The simple-object-xcoff.c file in libiberty produces a number of warnings of
> the form...
> 
> ./../../gcc-5-20150228/libiberty/simple-object-xcoff.c:330:12: warning:
> using extended field designator is an extension [-Wextended-offsetof]
>                               + offsetof (struct external_filehdr,
>                                 ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.
> xctoolchain/usr/bin/../lib/clang/6.0/include/stddef.h:87:24: note: expanded
> from macro
>       'offsetof'
> #define offsetof(t, d) __builtin_offsetof(t, d)
>                        ^
> 
> under the clang compiler as "offsetof(T, field,subfield)" and "offsetof(T,
> arr[3])" are C/C++ extensions and only "offsetof(T, field)" is standard.
> Shouldn't these be recoded to use the standard form?

Furthermore, it'd be a good idea if gcc supported the -Wextended-offsetof flag,
too, like clang does.

Reply via email to