diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-09-14 12:35:28 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-09-14 12:35:28 +0000 |
commit | 98ddffc1c10f62fca6e92b358b0a6d4398add660 (patch) | |
tree | 8c4d0bc038cced355310207cf85227cbbfb374ac /gcc/cp | |
parent | 8e3c61c5775fabd1e49fb3d4e80ea4a9cb0ab24c (diff) | |
download | gcc-98ddffc1c10f62fca6e92b358b0a6d4398add660.zip gcc-98ddffc1c10f62fca6e92b358b0a6d4398add660.tar.gz gcc-98ddffc1c10f62fca6e92b358b0a6d4398add660.tar.bz2 |
* pt.c (unify): Replace gcc_unreachable with gcc_assert.
From-SVN: r87491
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 42 |
2 files changed, 24 insertions, 24 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6d53c93..a54f556 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2004-09-14 Nathan Sidwell <nathan@codesourcery.com> + + * pt.c (unify): Replace gcc_unreachable with gcc_assert. + 2004-09-13 Mark Mitchell <mark@codesourcery.com> PR c++/16162 @@ -520,7 +524,6 @@ 2004-08-25 Nathan Sidwell <nathan@codesourcery.com> - * call.c (convert_class_to_reference): Adjust build_int_cst calls. (build_user_type_conversion_1, convert_like_real, build_java_interface_fn_ref, build_special_member_call): Likewise. @@ -546,6 +549,7 @@ * repo.c (extract_string): Reset backquote after one character. (get_base_filename): Fix indentation. + 2004-08-24 Nathan Sidwell <nathan@codesourcery.com> * decl.c (cxx_init_decl_processing): Adjust diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 90efa06..e7d44f2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10109,36 +10109,32 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict) return 1; default: - if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (parm)))) - { - - /* We're looking at an expression. This can happen with - something like: + gcc_assert (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (parm)))); + + /* We must be looking at an expression. This can happen with + something like: - template <int I> - void foo(S<I>, S<I + 2>); + template <int I> + void foo(S<I>, S<I + 2>); - This is a "nondeduced context": + This is a "nondeduced context": - [deduct.type] + [deduct.type] - The nondeduced contexts are: + The nondeduced contexts are: - --A type that is a template-id in which one or more of - the template-arguments is an expression that references - a template-parameter. + --A type that is a template-id in which one or more of + the template-arguments is an expression that references + a template-parameter. - In these cases, we assume deduction succeeded, but don't - actually infer any unifications. */ + In these cases, we assume deduction succeeded, but don't + actually infer any unifications. */ - if (!uses_template_parms (parm) - && !template_args_equal (parm, arg)) - return 1; - else - return 0; - } - gcc_unreachable (); - return 1; + if (!uses_template_parms (parm) + && !template_args_equal (parm, arg)) + return 1; + else + return 0; } } |