[Bug c++/6709] [DR743] decltype cannot be used with the :: operator

2011-07-22 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution||FIXED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.7.0

--- Comment #20 from Jason Merrill jason at gcc dot gnu.org 2011-07-22 
21:24:35 UTC ---
Implemented for 4.7.


[Bug c++/6709] [DR743] decltype cannot be used with the :: operator

2011-07-20 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709

--- Comment #19 from Jason Merrill jason at gcc dot gnu.org 2011-07-20 
14:21:09 UTC ---
Author: jason
Date: Wed Jul 20 14:21:05 2011
New Revision: 176513

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=176513
Log:
PR c++/6709 (DR 743)
PR c++/42603 (DR 950)
gcc/cp/
* parser.c (token_is_decltype, cp_lexer_next_token_is_decltype): New.
(cp_parser_nested_name_specifier_opt): Allow decltype.
(cp_parser_qualifying_entity): Likewise.
(cp_parser_decltype): Replace source tokens with CPP_DECLTYPE.
(cp_parser_simple_type_specifier): Handle decltype as scope.
(cp_parser_base_specifier): Allow decltype.
(cp_parser_base_clause): Don't crash on null base.
* parser.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move to c-common.h.
(CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
gcc/c-family/
* c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
(CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
(CPP_DECLTYPE): New.
* c-common.c (c_parse_error): Handle CPP_DECLTYPE.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype21.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/c-family/c-common.h
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/cp/parser.h
trunk/gcc/testsuite/ChangeLog


[Bug c++/6709] [DR743] decltype cannot be used with the :: operator

2011-04-06 Thread osa252 at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709

cheburnae osa252 at mail dot ru changed:

   What|Removed |Added

 CC||osa252 at mail dot ru

--- Comment #18 from cheburnae osa252 at mail dot ru 2011-04-06 14:23:53 UTC 
---
A simple workaround:

template class T
struct TypeEcho {
typedef T R;
};

#define TYPE_OF(expr) TypeEchotypeof (*expr)::R

template class T
void foo() {
typename TYPE_OF(std::vectorT())::value_type();
}

void foo2() {
TYPE_OF(std::vectorint())::value_type();
fooint();
}


[Bug c++/6709] [DR743] decltype cannot be used with the :: operator

2011-01-20 Thread dev.lists at jessamine dot co.uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709

Adam Butcher dev.lists at jessamine dot co.uk changed:

   What|Removed |Added

 CC||dev.lists at jessamine dot
   ||co.uk

--- Comment #17 from Adam Butcher dev.lists at jessamine dot co.uk 2011-01-20 
22:03:31 UTC ---
I have the beginnings of a fix for this (see the patch at
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01392.html); currently there is a
bug with my impl where any name on the right of `decltype(x)::' at the front of
a nested-name-specifier is considered a non-type unless qualified with
typename.

I.e. given:

   struct X { typedef int I; }
   X x;

instead of:

   decltype(x)::I i = 7;

the user must currently write:

   typename decltype(x)::I i = 7;

as if decltype(x) was somehow dependent on a template parameter -- which it
obviously isn't as there is no template it sight.

Otherwise the patch seems close.


[Bug c++/6709] [DR743] decltype cannot be used with the :: operator

2010-04-19 Thread redi at gcc dot gnu dot org


--- Comment #16 from redi at gcc dot gnu dot org  2010-04-19 09:38 ---
Unsuspending, DR743 was recently resolved


-- 

redi at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|SUSPENDED   |NEW
   Last reconfirmed|2009-04-16 18:10:10 |2010-04-19 09:38:32
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709



[Bug c++/6709] [DR743] decltype cannot be used with the :: operator

2010-04-18 Thread pinskia at gcc dot gnu dot org


--- Comment #14 from pinskia at gcc dot gnu dot org  2010-04-18 06:48 
---
*** Bug 43780 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||faisalv at yahoo dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709



[Bug c++/6709] [DR743] decltype cannot be used with the :: operator

2010-04-18 Thread faisalv at yahoo dot com


--- Comment #15 from faisalv at yahoo dot com  2010-04-18 12:56 ---
I had (In reply to comment #14)
 *** Bug 43780 has been marked as a duplicate of this bug. ***
 

The DR 743 has been voted into FCD (CD2) - shouldn't this be unsuspended?
thanks!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709