public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type
@ 2014-06-12 11:32 vmarko at google dot com
2014-06-12 13:45 ` [Bug c++/61484] " vmarko at google dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: vmarko at google dot com @ 2014-06-12 11:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61484
Bug ID: 61484
Summary: [C++11] [constexpr] can't initialize constexpr
multi-dimentional array of a literal type
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vmarko at google dot com
Test case:
struct S {
constexpr S() { }
};
constexpr S s[][1] = {
{ S() }
};
Bogus error:
test.cc:7:1: error: array must be initialized with a brace-enclosed initializer
Reproduced with gcc 4.6.3 on host (x86_64-linux-gnu) and gcc 4.8.0 from AOSP
prebuilts (x86_64-linux-android).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61484] [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type
2014-06-12 11:32 [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type vmarko at google dot com
@ 2014-06-12 13:45 ` vmarko at google dot com
2014-06-13 21:39 ` daniel.kruegler at googlemail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vmarko at google dot com @ 2014-06-12 13:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61484
Vladimir Marko <vmarko at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.8.0 |4.9.0
--- Comment #1 from Vladimir Marko <vmarko at google dot com> ---
Fails with gcc 4.9.0 from AOSP prebuilts (aarch64-linux-android).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61484] [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type
2014-06-12 11:32 [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type vmarko at google dot com
2014-06-12 13:45 ` [Bug c++/61484] " vmarko at google dot com
@ 2014-06-13 21:39 ` daniel.kruegler at googlemail dot com
2014-06-26 17:15 ` [Bug c++/61484] [C++11] " paolo.carlini at oracle dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-06-13 21:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61484
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
The same error exists in 4.10.0 20140612 (experimental)
>From gcc-bugs-return-454160-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 13 21:42:52 2014
Return-Path: <gcc-bugs-return-454160-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20417 invoked by alias); 13 Jun 2014 21:42:52 -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 20371 invoked by uid 48); 13 Jun 2014 21:42:48 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61488] [4.9/4.10 regression] Regression in template argument substitution in 4.9+
Date: Fri, 13 Jun 2014 21:42: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.kruegler at googlemail dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-61488-4-6XLRqUCKTE@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61488-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61488-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: 2014-06/txt/msg01242.txt.bz2
Content-length: 530
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61488
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 error also occurs for 4.10.0 20140612 (experimental)
>From gcc-bugs-return-454161-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 13 21:52:26 2014
Return-Path: <gcc-bugs-return-454161-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28223 invoked by alias); 13 Jun 2014 21:52:26 -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 28185 invoked by uid 48); 13 Jun 2014 21:52:22 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61500] [C++11] [4.8/4.9 Regression] Can't take pointer to member referenced via member pointer template parameter.
Date: Fri, 13 Jun 2014 21:52: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.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.kruegler at googlemail dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-61500-4-XxT4xfnLw9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61500-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61500-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: 2014-06/txt/msg01243.txt.bz2
Content-length: 531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61500
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 same problem exists in 4.10.0 20140612 (experimental)
>From gcc-bugs-return-454162-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 13 21:52:40 2014
Return-Path: <gcc-bugs-return-454162-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28907 invoked by alias); 13 Jun 2014 21:52: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 28863 invoked by uid 48); 13 Jun 2014 21:52:37 -0000
From: "harald at gigawatt dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/61502] == comparison on "one-past" pointer gives wrong result
Date: Fri, 13 Jun 2014 21:52: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.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: harald at gigawatt dot nl
X-Bugzilla-Status: UNCONFIRMED
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-61502-4-4SEgEl2Wsi@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61502-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61502-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: 2014-06/txt/msg01244.txt.bz2
Content-length: 1046
https://gcc.gnu.org/bugzilla/show_bug.cgi?ida502
Harald van Dijk <harald at gigawatt dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harald at gigawatt dot nl
--- Comment #2 from Harald van Dijk <harald at gigawatt dot nl> ---
DR#260 applies when using *p as if it is &y, just because it happens to compare
equal to it. For example, attempting to use it to read the value of y is not
permitted, even if guarded by an if (p == &y) condition. But that isn't the
case here: the pointer value &x + 1 is used in a way described in the standard
as the behaviour for the one-past-array values: the standard doesn't just
permit them to compare equal to an object immediately following it in memory;
what it does (because of the way it is worded) is require them to compare equal
to an object immediately following it in memory. (But I cannot even hazard a
guess as to whether that is intentional.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61484] [C++11] can't initialize constexpr multi-dimentional array of a literal type
2014-06-12 11:32 [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type vmarko at google dot com
2014-06-12 13:45 ` [Bug c++/61484] " vmarko at google dot com
2014-06-13 21:39 ` daniel.kruegler at googlemail dot com
@ 2014-06-26 17:15 ` paolo.carlini at oracle dot com
2014-08-29 8:33 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-06-26 17:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61484
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-06-26
Blocks| |55004
Summary|[C++11] [constexpr] can't |[C++11] can't initialize
|initialize constexpr |constexpr multi-dimentional
|multi-dimentional array of |array of a literal type
|a literal type |
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61484] [C++11] can't initialize constexpr multi-dimentional array of a literal type
2014-06-12 11:32 [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type vmarko at google dot com
` (2 preceding siblings ...)
2014-06-26 17:15 ` [Bug c++/61484] [C++11] " paolo.carlini at oracle dot com
@ 2014-08-29 8:33 ` paolo.carlini at oracle dot com
2014-08-29 8:41 ` paolo at gcc dot gnu.org
2014-08-29 8:44 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-08-29 8:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61484
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This works in current mainline, I'm adding the testcase and closing the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61484] [C++11] can't initialize constexpr multi-dimentional array of a literal type
2014-06-12 11:32 [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type vmarko at google dot com
` (3 preceding siblings ...)
2014-08-29 8:33 ` paolo.carlini at oracle dot com
@ 2014-08-29 8:41 ` paolo at gcc dot gnu.org
2014-08-29 8:44 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-08-29 8:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61484
--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Aug 29 08:41:16 2014
New Revision: 214718
URL: https://gcc.gnu.org/viewcvs?rev=214718&root=gcc&view=rev
Log:
2014-08-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61484
* g++.dg/cpp0x/constexpr-61484.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-61484.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61484] [C++11] can't initialize constexpr multi-dimentional array of a literal type
2014-06-12 11:32 [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type vmarko at google dot com
` (4 preceding siblings ...)
2014-08-29 8:41 ` paolo at gcc dot gnu.org
@ 2014-08-29 8:44 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-08-29 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61484
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.0
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-08-29 8:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 11:32 [Bug c++/61484] New: [C++11] [constexpr] can't initialize constexpr multi-dimentional array of a literal type vmarko at google dot com
2014-06-12 13:45 ` [Bug c++/61484] " vmarko at google dot com
2014-06-13 21:39 ` daniel.kruegler at googlemail dot com
2014-06-26 17:15 ` [Bug c++/61484] [C++11] " paolo.carlini at oracle dot com
2014-08-29 8:33 ` paolo.carlini at oracle dot com
2014-08-29 8:41 ` paolo at gcc dot gnu.org
2014-08-29 8:44 ` 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).