public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66644] New: Rejects C++11 in-class anonymous union members initialization
@ 2015-06-23 19:02 bisqwit at iki dot fi
2015-06-23 19:03 ` [Bug c++/66644] " bisqwit at iki dot fi
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: bisqwit at iki dot fi @ 2015-06-23 19:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66644
Bug ID: 66644
Summary: Rejects C++11 in-class anonymous union members
initialization
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bisqwit at iki dot fi
Target Milestone: ---
Accepted by GCC:
struct test
{ union
{
struct { char a=0, b; };
char buffer[16];
}; };
NOT accepted by GCC (multiple fields in union 'test::<anonymous union>'
initialized):
struct test
{ union
{
struct { char a=0, b=0; };
char buffer[16];
}; };
Still accepted by GCC:
struct test
{ union
{
struct { char a, b; } test2{0,
char buffer[16];
}; };
I think there's a compiler bug here. It should not complain about initializing
multiple fields in a struct that is nested inside the union, because this does
not comprise a conflict.
Tested on GCC versions 4.7.4, 4.8.4, 4.9.2, and 5.1.1.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/66644] Rejects C++11 in-class anonymous union members initialization
2015-06-23 19:02 [Bug c++/66644] New: Rejects C++11 in-class anonymous union members initialization bisqwit at iki dot fi
@ 2015-06-23 19:03 ` bisqwit at iki dot fi
2015-06-24 20:12 ` daniel.kruegler at googlemail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: bisqwit at iki dot fi @ 2015-06-23 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66644
--- Comment #1 from Joel Yliluoma <bisqwit at iki dot fi> ---
The last code piece should have test2{0,0}; there. Something ate a couple of
characters off the end of that line.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/66644] Rejects C++11 in-class anonymous union members initialization
2015-06-23 19:02 [Bug c++/66644] New: Rejects C++11 in-class anonymous union members initialization bisqwit at iki dot fi
2015-06-23 19:03 ` [Bug c++/66644] " bisqwit at iki dot fi
@ 2015-06-24 20:12 ` daniel.kruegler at googlemail dot com
2015-06-25 13:55 ` redi at gcc dot gnu.org
2015-07-08 14:32 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2015-06-24 20:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66644
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
The problem also exists in the current HEAD (Tested for gcc HEAD 6.0.0 20150623
(experimental))
>From gcc-bugs-return-490118-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 20:24:34 2015
Return-Path: <gcc-bugs-return-490118-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 107518 invoked by alias); 24 Jun 2015 20:24:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 106835 invoked by uid 48); 24 Jun 2015 20:24:26 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66656] static constexpr array member: cannot get size via constexpr function
Date: Wed, 24 Jun 2015 20:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.kruegler at googlemail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-66656-4-iGlJ7VSW7O@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66656-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66656-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02451.txt.bz2
Content-length: 745
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66656
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
The compiler/linker is right: You still need to provide a definition for the
second static data member. Providing an initializer does not provide such a
definition. To fix your problem, just add the line
constexpr X::item X::arr1[];
to your code.
This is not a defect.
>From gcc-bugs-return-490119-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 20:24:40 2015
Return-Path: <gcc-bugs-return-490119-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 108301 invoked by alias); 24 Jun 2015 20:24:40 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 107679 invoked by uid 55); 24 Jun 2015 20:24:34 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65919] [5/6 Regression] GCC 5.1 with options "-g -std=c++14" fails to compile multiple lambdas used as default function parameters
Date: Wed, 24 Jun 2015 20:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65919-4-hSiqWuydZu@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65919-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65919-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02450.txt.bz2
Content-length: 695
https://gcc.gnu.org/bugzilla/show_bug.cgi?ide919
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jun 24 20:24:01 2015
New Revision: 224922
URL: https://gcc.gnu.org/viewcvs?rev"4922&root=gcc&view=rev
Log:
PR c++/65919
* mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
(decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
* cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
Modified:
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/cp-tree.h
branches/gcc-5-branch/gcc/cp/mangle.c
branches/gcc-5-branch/gcc/testsuite/g++.dg/abi/mangle58.C
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/66644] Rejects C++11 in-class anonymous union members initialization
2015-06-23 19:02 [Bug c++/66644] New: Rejects C++11 in-class anonymous union members initialization bisqwit at iki dot fi
2015-06-23 19:03 ` [Bug c++/66644] " bisqwit at iki dot fi
2015-06-24 20:12 ` daniel.kruegler at googlemail dot com
@ 2015-06-25 13:55 ` redi at gcc dot gnu.org
2015-07-08 14:32 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2015-06-25 13:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66644
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-06-25
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/66644] Rejects C++11 in-class anonymous union members initialization
2015-06-23 19:02 [Bug c++/66644] New: Rejects C++11 in-class anonymous union members initialization bisqwit at iki dot fi
` (2 preceding siblings ...)
2015-06-25 13:55 ` redi at gcc dot gnu.org
@ 2015-07-08 14:32 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-07-08 14:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66644
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Target Milestone|--- |6.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-08 14:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 19:02 [Bug c++/66644] New: Rejects C++11 in-class anonymous union members initialization bisqwit at iki dot fi
2015-06-23 19:03 ` [Bug c++/66644] " bisqwit at iki dot fi
2015-06-24 20:12 ` daniel.kruegler at googlemail dot com
2015-06-25 13:55 ` redi at gcc dot gnu.org
2015-07-08 14:32 ` paolo.carlini at oracle 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).