diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-10-18 13:45:23 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2005-10-18 13:45:23 +0000 |
commit | bbec1b62268caf2fb5a5bb1ed7f5c68a5bb48d3b (patch) | |
tree | 85ecd5f1d7feccfd509975da7f7a589016bcb368 /gcc/cp | |
parent | 775b9f4147101437006c9220f6d4101abae8a747 (diff) |
cp:
PR c++/21383
* name-lookup.c (arg_assoc): Template args can be null in a
template-id-expr.
testsuite:
PR c++/21383
* g++.dg/overload/koenig2.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@105553 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cd3cded707a..42dc317095d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2005-10-18 Nathan Sidwell <nathan@codesourcery.com> + PR c++/21383 + * name-lookup.c (arg_assoc): Template args can be null in a + template-id-expr. + PR c++/22604 * class.c (update_vtable_entry_for_fn): Don't process invalid covariant overriders. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 29e5f2b2be6..13d789b1f56 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4594,9 +4594,10 @@ arg_assoc (struct arg_lookup *k, tree n) return true; /* Now the arguments. */ - for (ix = TREE_VEC_LENGTH (args); ix--;) - if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1) - return true; + if (args) + for (ix = TREE_VEC_LENGTH (args); ix--;) + if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1) + return true; } else if (TREE_CODE (n) == OVERLOAD) { |