diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-24 09:04:06 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-24 09:04:06 +0000 |
commit | c645999e7b458447806f01170dda9e99a5805e17 (patch) | |
tree | c0dab5af1a18218b4a04bf6b03ac689742fa8100 /gcc/cp | |
parent | d46cd2be374fa3791edc5f69cb2731b9bae11af3 (diff) | |
download | gcc-c645999e7b458447806f01170dda9e99a5805e17.zip gcc-c645999e7b458447806f01170dda9e99a5805e17.tar.gz gcc-c645999e7b458447806f01170dda9e99a5805e17.tar.bz2 |
re PR c++/17149 (ICE: tree check: expected record_type or union_type or qual_union_type, have template_type_parm in check_accessibility_of_qualified_id, at cp/semantics.c:1388)
cp:
PR c++/17149
* semantics.c (check_accessibility_of_qualified_id): Defer check
if qualifying_type is a template parameter.
testsuite:
PR c++/17149
* g++.dg/template/access15.C: New.
From-SVN: r86472
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7e013c7..ddeb19e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-08-24 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/17149 + * semantics.c (check_accessibility_of_qualified_id): Defer check + if qualifying_type is a template parameter. + 2004-08-23 Mark Mitchell <mark@codesourcery.com> PR c++/17163 @@ -11,7 +17,7 @@ Revert: 2004-08-22 Andrew Pinski <apinski@apple.com> PR c++/14029 - * typeck.c (build_unary_op): Use &a.b if the foldded lowered + * typeck.c (build_unary_op): Use &a.b if the folded lowered expression is not constant. 2004-08-23 Nathan Sidwell <nathan@codesourcery.com> @@ -23,7 +29,7 @@ 2004-08-22 Andrew Pinski <apinski@apple.com> PR c++/14029 - * typeck.c (build_unary_op): Use &a.b if the foldded lowered + * typeck.c (build_unary_op): Use &a.b if the folded lowered expression is not constant. 2004-08-20 Mark Mitchell <mark@codesourcery.com> diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 302d00e..b221cd2 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1384,7 +1384,9 @@ check_accessibility_of_qualified_id (tree decl, its bases. */ qualifying_type = currently_open_derived_class (scope); - if (qualifying_type) + if (qualifying_type && IS_AGGR_TYPE_CODE (TREE_CODE (qualifying_type))) + /* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM + or similar in a default argument value. */ perform_or_defer_access_check (TYPE_BINFO (qualifying_type), decl); } |