* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
@ 2012-08-09 8:09 ` lundberj at gmail dot com
2012-08-10 9:39 ` redi at gcc dot gnu.org
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: lundberj at gmail dot com @ 2012-08-09 8:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
--- Comment #1 from Johan Lundberg <lundberj at gmail dot com> 2012-08-09 08:08:46 UTC ---
confirmed... I agree with this. Among other things it's important for
boost/C++11 interop.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
2012-08-09 8:09 ` [Bug c++/52748] " lundberj at gmail dot com
@ 2012-08-10 9:39 ` redi at gcc dot gnu.org
2012-11-07 4:31 ` zeratul976 at hotmail dot com
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2012-08-10 9:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-08-10
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
2012-08-09 8:09 ` [Bug c++/52748] " lundberj at gmail dot com
2012-08-10 9:39 ` redi at gcc dot gnu.org
@ 2012-11-07 4:31 ` zeratul976 at hotmail dot com
2012-11-07 4:32 ` zeratul976 at hotmail dot com
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-11-07 4:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
--- Comment #2 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-11-07 04:31:24 UTC ---
Clang deemed this issue important enough to warrant a new entry ("Incomplete
retrn types", under "Declared type of an expression") in their C++11 status
page.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (2 preceding siblings ...)
2012-11-07 4:31 ` zeratul976 at hotmail dot com
@ 2012-11-07 4:32 ` zeratul976 at hotmail dot com
2013-02-18 12:47 ` redi at gcc dot gnu.org
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-11-07 4:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
--- Comment #3 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-11-07 04:32:06 UTC ---
(In reply to comment #2)
> Clang deemed this issue important enough to warrant a new entry ("Incomplete
> retrn types", under "Declared type of an expression") in their C++11 status
> page.
Link: http://clang.llvm.org/cxx_status.html
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (3 preceding siblings ...)
2012-11-07 4:32 ` zeratul976 at hotmail dot com
@ 2013-02-18 12:47 ` redi at gcc dot gnu.org
2013-02-26 20:21 ` jason at gcc dot gnu.org
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-18 12:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-18 12:47:32 UTC ---
*** Bug 56374 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (4 preceding siblings ...)
2013-02-18 12:47 ` redi at gcc dot gnu.org
@ 2013-02-26 20:21 ` jason at gcc dot gnu.org
2013-03-17 2:38 ` jason at gcc dot gnu.org
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-26 20:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (5 preceding siblings ...)
2013-02-26 20:21 ` jason at gcc dot gnu.org
@ 2013-03-17 2:38 ` jason at gcc dot gnu.org
2013-03-23 10:52 ` paolo.carlini at oracle dot com
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-17 2:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-17 02:37:21 UTC ---
Author: jason
Date: Sun Mar 17 02:37:09 2013
New Revision: 196736
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196736
Log:
N3276
PR c++/52748
* cp-tree.h (tsubst_flags): Add tf_decltype.
* call.c (build_cxx_call): Don't build a temporary if it's set.
(build_over_call): Make sure it's only passed to build_cxx_call.
* parser.c (cp_parser_primary_expression): Add decltype_p parm.
(cp_parser_unary_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_binary_expression): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_postfix_expression): Likewise. Pass tf_decltype.
(cp_parser_explicit_instantiation): Add decltype_p. Force a
temporary for a call on the LHS of a comma.
(cp_parser_decltype): Pass true to decltype_p parms.
* pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
(tsubst_copy_and_build): Pass tf_decltype down only for
CALL_EXPR and the RHS of COMPOUND_EXPR.
* tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/tree.c
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (6 preceding siblings ...)
2013-03-17 2:38 ` jason at gcc dot gnu.org
@ 2013-03-23 10:52 ` paolo.carlini at oracle dot com
2013-03-26 14:31 ` jason at gcc dot gnu.org
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-23 10:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jason at gcc dot gnu.org |
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-23 10:52:25 UTC ---
Fixed 4.8.1 too.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (7 preceding siblings ...)
2013-03-23 10:52 ` paolo.carlini at oracle dot com
@ 2013-03-26 14:31 ` jason at gcc dot gnu.org
2013-03-28 13:11 ` mimomorin at gmail dot com
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-26 14:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.8.1
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-26 14:31:48 UTC ---
Closing.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (8 preceding siblings ...)
2013-03-26 14:31 ` jason at gcc dot gnu.org
@ 2013-03-28 13:11 ` mimomorin at gmail dot com
2013-03-28 13:29 ` [Bug c++/52748] [4.9 Regression][C++11] " paolo.carlini at oracle dot com
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mimomorin at gmail dot com @ 2013-03-28 13:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Michel Morin <mimomorin at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mimomorin at gmail dot com
--- Comment #8 from Michel Morin <mimomorin at gmail dot com> 2013-03-28 13:11:00 UTC ---
The implementation of N3276 is not complete.
`decltype` in gcc-4.9-20130324 does not require type-completeness
but involves unnecessary template instantiations:
* Compilation of the demonstration code in N3276 (also appeared in
Nathan Ridge's comment in this PR) exhausted memory on my PC,
so I had to quit the compilation.
* Boost's testing code
(https://svn.boost.org/svn/boost/trunk/libs/config/test/boost_no_decltype_n3276.ipp)
failed to compile.
(One needs to remove `namespace boost_no_cxx11_decltype_n3276 {` and its
closing
brace`}`, and rename `int test()` to `int main()` before the compilation.)
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (9 preceding siblings ...)
2013-03-28 13:11 ` mimomorin at gmail dot com
@ 2013-03-28 13:29 ` paolo.carlini at oracle dot com
2013-03-28 13:36 ` jason at gcc dot gnu.org
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-28 13:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
Summary|[C++11] N3276 changes to |[4.9 Regression][C++11]
|decltype |N3276 changes to decltype
--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-28 13:29:00 UTC ---
Jason is the right person to answer your first and third question, but the
answer to the second one is simple: we have a regression in mainline, current
4_8-branch works fine.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (10 preceding siblings ...)
2013-03-28 13:29 ` [Bug c++/52748] [4.9 Regression][C++11] " paolo.carlini at oracle dot com
@ 2013-03-28 13:36 ` jason at gcc dot gnu.org
2013-03-28 20:03 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-28 13:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-28 13:36:07 UTC ---
The implementation is complete. Unfortunately, my fixes for DRs 337 and 657
are interfering with the desired result; creating a function type returning an
abstract class causes deduction to fail, so we instantiate the return type of
wrap in order to determine whether it is abstract. I guess I'll disable that
instantiation and raise this issue with Core...
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (11 preceding siblings ...)
2013-03-28 13:36 ` jason at gcc dot gnu.org
@ 2013-03-28 20:03 ` jason at gcc dot gnu.org
2013-03-29 0:41 ` mimomorin at gmail dot com
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-28 20:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-28 20:02:57 UTC ---
Fixed again. I added a different testcase whose failure mode is an error,
rather than consuming all resources.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (12 preceding siblings ...)
2013-03-28 20:03 ` jason at gcc dot gnu.org
@ 2013-03-29 0:41 ` mimomorin at gmail dot com
2013-04-10 9:27 ` zeratul976 at hotmail dot com
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mimomorin at gmail dot com @ 2013-03-29 0:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
--- Comment #13 from Michel Morin <mimomorin at gmail dot com> 2013-03-29 00:40:59 UTC ---
Thanks Jason, Paolo.
I'll enable N3276 decltype support in Boost.Config for gcc 4.8.1 and 4.9.0.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (13 preceding siblings ...)
2013-03-29 0:41 ` mimomorin at gmail dot com
@ 2013-04-10 9:27 ` zeratul976 at hotmail dot com
2013-04-11 21:46 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: zeratul976 at hotmail dot com @ 2013-04-10 9:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Nathan Ridge <zeratul976 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #14 from Nathan Ridge <zeratul976 at hotmail dot com> 2013-04-10 09:27:10 UTC ---
Here is a related example that still fails to compile:
template <int> struct A;
template <typename T> struct B : A<sizeof(T)> {};
template <typename T>
B<typename T::type> operator-(T);
struct S
{
struct F
{
typedef S type;
};
auto foo() -> decltype(-F());
};
This is compiled successfully by clang, but GCC (4.9, r197663) gives the
following error:
test.cpp: In instantiation of 'struct B<S>':
test.cpp:15:31: required from here
test.cpp:3:42: error: invalid application of 'sizeof' to incomplete type 'S'
template <typename T> struct B : A<sizeof(T)> {};
^
If the operator- is replaced by a non-operator function, GCC compiles the
example successfully, which leads me to believe it's a bug.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (14 preceding siblings ...)
2013-04-10 9:27 ` zeratul976 at hotmail dot com
@ 2013-04-11 21:46 ` jason at gcc dot gnu.org
2013-04-12 7:23 ` zeratul976 at hotmail dot com
2013-04-16 21:24 ` jason at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-11 21:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-11 21:46:33 UTC ---
(In reply to comment #14)
> Here is a related example that still fails to compile:
Fixed.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (15 preceding siblings ...)
2013-04-11 21:46 ` jason at gcc dot gnu.org
@ 2013-04-12 7:23 ` zeratul976 at hotmail dot com
2013-04-16 21:24 ` jason at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: zeratul976 at hotmail dot com @ 2013-04-12 7:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Nathan Ridge <zeratul976 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #17 from Nathan Ridge <zeratul976 at hotmail dot com> 2013-04-12 07:23:07 UTC ---
(Sorry, meant to reopen with last comment.)
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/52748] [4.9 Regression][C++11] N3276 changes to decltype
2012-03-28 5:33 [Bug c++/52748] New: [C++11] N3276 changes to decltype zeratul976 at hotmail dot com
` (16 preceding siblings ...)
2013-04-12 7:23 ` zeratul976 at hotmail dot com
@ 2013-04-16 21:24 ` jason at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-16 21:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52748
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #18 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-16 21:24:12 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 19+ messages in thread