[Bug bootstrap/98323] current trunk won't build with clang

2021-01-04 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

--- Comment #9 from joseph at codesourcery dot com  ---
The original intent in the C standard was definitely to allow at least 
some cases of subobjects; the May 20, 1988 list of changes in the third 
public review draft of C89 has as item 10 "The offsetof macro has been 
generalized to allow more than just a simple identifier as its second 
argument.".

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

--- Comment #8 from Jakub Jelinek  ---
See also http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2396.htm#dr_496

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek  ---
(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.

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #6 from Eric Gallager  ---
(In reply to Nathan Sidwell from comment #2)
> stupid underspecified offsetof

Is this related to bug 65254?

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread nathan at acm dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

--- Comment #5 from Nathan Sidwell  ---
On 12/16/20 12:45 PM, dcb314 at hotmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
> 
> --- Comment #3 from David Binderman  ---
> (In reply to Nathan Sidwell from comment #2)
>> stupid underspecified offsetof
> 
> I did try commenting out the offending block of code and a re-build
> and got further errors ;-<
> 
> I don't know if you have access to clang, but if you don't,
> may I be so bold as to suggest you install a copy and, if
> you have the time, attempt a full build with clang ?

but, but, that'd require me to do actual work !

> 
> That should flush out all the gcc specific code in your recent changes.
> 
> Excellent compiler, BTW.

which, clang or GCC?  (why not both ¯\_(ツ)_/¯)

nathan

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread nathan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

Nathan Sidwell  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #4 from Nathan Sidwell  ---
Fixed 8379916b167

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

--- Comment #3 from David Binderman  ---
(In reply to Nathan Sidwell from comment #2)
> stupid underspecified offsetof

I did try commenting out the offending block of code and a re-build
and got further errors ;-<

I don't know if you have access to clang, but if you don't,
may I be so bold as to suggest you install a copy and, if
you have the time, attempt a full build with clang ?

That should flush out all the gcc specific code in your recent changes.

Excellent compiler, BTW.

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread nathan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

Nathan Sidwell  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |nathan at gcc dot 
gnu.org

--- Comment #2 from Nathan Sidwell  ---
stupid underspecified offsetof

[Bug bootstrap/98323] current trunk won't build with clang

2020-12-16 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323

David Binderman  changed:

   What|Removed |Added

 CC||nathan at gcc dot gnu.org

--- Comment #1 from David Binderman  ---
git blame says

4efde6781bba (Nathan Sidwell 2020-12-14 11:40:44 -0800  4153)   /* Create
or extend the dump implementor.  */
4efde6781bba (Nathan Sidwell 2020-12-14 11:40:44 -0800  4154)   unsigned
current = dumps ? dumps->stack.length () : 0;
4efde6781bba (Nathan Sidwell 2020-12-14 11:40:44 -0800  4155)   unsigned
count = current ? current * 2 : EXPERIMENT (1, 20);
4efde6781bba (Nathan Sidwell 2020-12-14 11:40:44 -0800  4156)   size_t
alloc = (offsetof (impl, impl::stack)
4efde6781bba (Nathan Sidwell 2020-12-14 11:40:44 -0800  4157) +
impl::stack_t::embedded_size (count));
4efde6781bba (Nathan Sidwell 2020-12-14 11:40:44 -0800  4158)   dumps =
XRESIZEVAR (impl, dumps, alloc);
4efde6781bba (Nathan Sidwell 2020-12-14 11:40:44 -0800  4159)  
dumps->stack.embedded_init (count, current);

Adding Nathan.