public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/98323] New: current trunk won't build with clang
@ 2020-12-16 17:27 dcb314 at hotmail dot com
2020-12-16 17:28 ` [Bug bootstrap/98323] " dcb314 at hotmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2020-12-16 17:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
Bug ID: 98323
Summary: current trunk won't build with clang
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Current trunk has hash 5098d35fb1997aa6.
I tried building it with clang version 11.0.0
and got this:
../../trunk.git/gcc/cp/module.cc:4156:43: error: expected ')'
size_t alloc = (offsetof (impl, impl::stack)
^
../../trunk.git/gcc/cp/module.cc:4156:23: note: to match this '('
size_t alloc = (offsetof (impl, impl::stack)
^
/usr/lib64/clang/11.0.0/include/stddef.h:104:42: note: expanded from macro
'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^
For the record, it builds happily with recent gcc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
@ 2020-12-16 17:28 ` dcb314 at hotmail dot com
2020-12-16 17:35 ` nathan at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2020-12-16 17:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at gcc dot gnu.org
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
2020-12-16 17:28 ` [Bug bootstrap/98323] " dcb314 at hotmail dot com
@ 2020-12-16 17:35 ` nathan at gcc dot gnu.org
2020-12-16 17:45 ` dcb314 at hotmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-12-16 17:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |nathan at gcc dot gnu.org
--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
stupid underspecified offsetof
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
2020-12-16 17:28 ` [Bug bootstrap/98323] " dcb314 at hotmail dot com
2020-12-16 17:35 ` nathan at gcc dot gnu.org
@ 2020-12-16 17:45 ` dcb314 at hotmail dot com
2020-12-16 17:47 ` nathan at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2020-12-16 17:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
(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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
` (2 preceding siblings ...)
2020-12-16 17:45 ` dcb314 at hotmail dot com
@ 2020-12-16 17:47 ` nathan at gcc dot gnu.org
2020-12-16 20:22 ` nathan at acm dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-12-16 17:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Fixed 8379916b167
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
` (3 preceding siblings ...)
2020-12-16 17:47 ` nathan at gcc dot gnu.org
@ 2020-12-16 20:22 ` nathan at acm dot org
2020-12-16 23:52 ` egallager at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: nathan at acm dot org @ 2020-12-16 20:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
--- Comment #5 from Nathan Sidwell <nathan at acm dot org> ---
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 <dcb314 at hotmail dot com> ---
> (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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
` (4 preceding siblings ...)
2020-12-16 20:22 ` nathan at acm dot org
@ 2020-12-16 23:52 ` egallager at gcc dot gnu.org
2020-12-17 0:23 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: egallager at gcc dot gnu.org @ 2020-12-16 23:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Nathan Sidwell from comment #2)
> stupid underspecified offsetof
Is this related to bug 65254?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
` (5 preceding siblings ...)
2020-12-16 23:52 ` egallager at gcc dot gnu.org
@ 2020-12-17 0:23 ` jakub at gcc dot gnu.org
2020-12-17 0:30 ` jakub at gcc dot gnu.org
2021-01-04 22:23 ` joseph at codesourcery dot com
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-17 0:23 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
` (6 preceding siblings ...)
2020-12-17 0:23 ` jakub at gcc dot gnu.org
@ 2020-12-17 0:30 ` jakub at gcc dot gnu.org
2021-01-04 22:23 ` joseph at codesourcery dot com
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-17 0:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
See also http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2396.htm#dr_496
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/98323] current trunk won't build with clang
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
` (7 preceding siblings ...)
2020-12-17 0:30 ` jakub at gcc dot gnu.org
@ 2021-01-04 22:23 ` joseph at codesourcery dot com
8 siblings, 0 replies; 10+ messages in thread
From: joseph at codesourcery dot com @ 2021-01-04 22:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98323
--- Comment #9 from joseph at codesourcery dot com <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.".
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-01-04 22:23 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 17:27 [Bug bootstrap/98323] New: current trunk won't build with clang dcb314 at hotmail dot com
2020-12-16 17:28 ` [Bug bootstrap/98323] " dcb314 at hotmail dot com
2020-12-16 17:35 ` nathan at gcc dot gnu.org
2020-12-16 17:45 ` dcb314 at hotmail dot com
2020-12-16 17:47 ` nathan at gcc dot gnu.org
2020-12-16 20:22 ` nathan at acm dot org
2020-12-16 23:52 ` egallager at gcc dot gnu.org
2020-12-17 0:23 ` jakub at gcc dot gnu.org
2020-12-17 0:30 ` jakub at gcc dot gnu.org
2021-01-04 22:23 ` joseph at codesourcery dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).