public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61683] New: decltype-specifier not accepted as mem-initializer-id
@ 2014-07-03 2:23 bbi5291 at gmail dot com
2014-12-14 0:59 ` [Bug c++/61683] " ville.voutilainen at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bbi5291 at gmail dot com @ 2014-07-03 2:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61683
Bug ID: 61683
Summary: decltype-specifier not accepted as mem-initializer-id
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bbi5291 at gmail dot com
$ cat main.cpp
struct A {};
A a;
struct B : A {
B(): decltype(a)() {}
};
int main() {}
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --program-suffix=-4.9.0
Thread model: posix
gcc version 4.9.0 (GCC)
$ g++-4.9.0 -std=c++11 main.cpp
main.cpp: In constructor ‘B::B()’:
main.cpp:4:10: error: expected identifier before ‘decltype’
B(): decltype(a)() {}
^
main.cpp:4:10: error: expected ‘{’ before ‘decltype’
--
This code should compile because the standard says that any class-or-decltype
that denotes a base class can be used in a mem-initializer-list.
clang accepts: http://coliru.stacked-crooked.com/a/b50333efbcab9d26
>From gcc-bugs-return-455544-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 03 02:32:00 2014
Return-Path: <gcc-bugs-return-455544-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25324 invoked by alias); 3 Jul 2014 02:30:35 -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 25008 invoked by uid 48); 3 Jul 2014 02:30:08 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61382] parameter pack expansion unexpected order
Date: Thu, 03 Jul 2014 02:30: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: jason at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.10.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61382-4-rieYtz0p4O@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61382-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61382-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-07/txt/msg00135.txt.bz2
Content-length: 495
https://gcc.gnu.org/bugzilla/show_bug.cgi?ida382
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Brooks Moses from comment #9)
> FWIW, the new initlist86.C test that this adds is failing on the
> google/gcc-4_9 branch on powerpc64le and aarch64, though it passes on
> x86_64. I haven't yet checked on the upstream 4.9 branch, but I figured a
> heads-up might be useful.
Thanks. Does removing "PUSH_ARGS_REVERSED &&" from the cp_gimplify_expr change
fix it?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61683] decltype-specifier not accepted as mem-initializer-id
2014-07-03 2:23 [Bug c++/61683] New: decltype-specifier not accepted as mem-initializer-id bbi5291 at gmail dot com
@ 2014-12-14 0:59 ` ville.voutilainen at gmail dot com
2015-04-29 23:04 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-14 0:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61683
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-12-14
CC| |ville.voutilainen at gmail dot com
Ever confirmed|0 |1
Known to fail| |4.8.2, 4.9.1, 5.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61683] decltype-specifier not accepted as mem-initializer-id
2014-07-03 2:23 [Bug c++/61683] New: decltype-specifier not accepted as mem-initializer-id bbi5291 at gmail dot com
2014-12-14 0:59 ` [Bug c++/61683] " ville.voutilainen at gmail dot com
@ 2015-04-29 23:04 ` paolo.carlini at oracle dot com
2015-05-21 15:52 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-04-29 23:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61683
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 #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61683] decltype-specifier not accepted as mem-initializer-id
2014-07-03 2:23 [Bug c++/61683] New: decltype-specifier not accepted as mem-initializer-id bbi5291 at gmail dot com
2014-12-14 0:59 ` [Bug c++/61683] " ville.voutilainen at gmail dot com
2015-04-29 23:04 ` paolo.carlini at oracle dot com
@ 2015-05-21 15:52 ` paolo.carlini at oracle dot com
2015-06-02 10:28 ` paolo at gcc dot gnu.org
2015-06-02 10:29 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-05-21 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61683
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Patch here: https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01948.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61683] decltype-specifier not accepted as mem-initializer-id
2014-07-03 2:23 [Bug c++/61683] New: decltype-specifier not accepted as mem-initializer-id bbi5291 at gmail dot com
` (2 preceding siblings ...)
2015-05-21 15:52 ` paolo.carlini at oracle dot com
@ 2015-06-02 10:28 ` paolo at gcc dot gnu.org
2015-06-02 10:29 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-06-02 10:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61683
--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Jun 2 10:28:14 2015
New Revision: 224022
URL: https://gcc.gnu.org/viewcvs?rev=224022&root=gcc&view=rev
Log:
/cp
2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61683
* parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
/testsuite
2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61683
* g++.dg/cpp0x/decltype-mem-initializer1.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype-mem-initializer1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61683] decltype-specifier not accepted as mem-initializer-id
2014-07-03 2:23 [Bug c++/61683] New: decltype-specifier not accepted as mem-initializer-id bbi5291 at gmail dot com
` (3 preceding siblings ...)
2015-06-02 10:28 ` paolo at gcc dot gnu.org
@ 2015-06-02 10:29 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-06-02 10:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61683
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-02 10:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 2:23 [Bug c++/61683] New: decltype-specifier not accepted as mem-initializer-id bbi5291 at gmail dot com
2014-12-14 0:59 ` [Bug c++/61683] " ville.voutilainen at gmail dot com
2015-04-29 23:04 ` paolo.carlini at oracle dot com
2015-05-21 15:52 ` paolo.carlini at oracle dot com
2015-06-02 10:28 ` paolo at gcc dot gnu.org
2015-06-02 10:29 ` 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).