diff options
author | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2003-12-02 15:46:51 +0000 |
---|---|---|
committer | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2003-12-02 15:46:51 +0000 |
commit | 59e7a90194128726d24c8637c92f445b8b424e33 (patch) | |
tree | 4b7c605801913d140a9e47110a4f04cd8d62421f /gcc/cp | |
parent | c531dd016b224f94eef10fdb562443aef5f64e61 (diff) | |
download | gcc-59e7a90194128726d24c8637c92f445b8b424e33.zip gcc-59e7a90194128726d24c8637c92f445b8b424e33.tar.gz gcc-59e7a90194128726d24c8637c92f445b8b424e33.tar.bz2 |
re PR c++/10126 (ICE in convert_nontype_argument on using overload resolution in template args)
PR c++/10126
* pt.c (convert_nontype_argument): Handle default conversions
while converting a pointer to member function.
From-SVN: r74184
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9723968..7b7f63a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org> + PR c++/10126
+ * pt.c (convert_nontype_argument): Handle default conversions
+ while converting a pointer to member function.
+ +2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org> + PR c++/12573
* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
looking into them recursively.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 93d790b..33c2589 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3440,8 +3440,9 @@ convert_nontype_argument (tree type, tree expr) if (expr == error_mark_node) return error_mark_node; - my_friendly_assert (same_type_p (type, TREE_TYPE (expr)), - 0); + if (!same_type_p (type, TREE_TYPE (expr))) + return error_mark_node; + return expr; } break; |