diff options
| author | Jason Merrill <jason@redhat.com> | 2010-02-18 11:27:18 -0500 |
|---|---|---|
| committer | Jason Merrill <jason@gcc.gnu.org> | 2010-02-18 11:27:18 -0500 |
| commit | 04daa92ba7e36a63dfd7bb1b5959d8afa187ecd1 (patch) | |
| tree | f48f260ba50e9024ae229afffa80939640581a5c /gcc/cp/parser.c | |
| parent | 935c0a5d24f70295aee602e4dcdff465d1931024 (diff) | |
| download | gcc-04daa92ba7e36a63dfd7bb1b5959d8afa187ecd1.zip gcc-04daa92ba7e36a63dfd7bb1b5959d8afa187ecd1.tar.gz gcc-04daa92ba7e36a63dfd7bb1b5959d8afa187ecd1.tar.bz2 | |
re PR c++/26261 (Rejects template with const static data member used in return type)
PR c++/26261
PR c++/43101
* pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
(maybe_update_decl_type): New fn.
* parser.c (cp_parser_init_declarator): Use it.
From-SVN: r156865
Diffstat (limited to 'gcc/cp/parser.c')
| -rw-r--r-- | gcc/cp/parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 690f2c0..55d0517 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -13477,6 +13477,11 @@ cp_parser_init_declarator (cp_parser* parser, we compute it now. */ scope = get_scope_of_declarator (declarator); + /* Perform any lookups in the declared type which were thought to be + dependent, but are not in the scope of the declarator. */ + decl_specifiers->type + = maybe_update_decl_type (decl_specifiers->type, scope); + /* If we're allowing GNU extensions, look for an asm-specification and attributes. */ if (cp_parser_allow_gnu_extensions_p (parser)) |
