aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2021-03-17 19:39:10 -0400
committerMarek Polacek <polacek@redhat.com>2021-03-18 14:20:00 -0400
commitc5e55673b486533c4d6d19ac903460f70b48f11a (patch)
tree9098ebd9b6e9d249de7ff5dc7611e85ac6b6a114 /gcc
parent55308fc26318427c1438cecc60ddd7ba24d5cd33 (diff)
downloadgcc-c5e55673b486533c4d6d19ac903460f70b48f11a.zip
gcc-c5e55673b486533c4d6d19ac903460f70b48f11a.tar.gz
gcc-c5e55673b486533c4d6d19ac903460f70b48f11a.tar.bz2
c++: Add assert to tsubst.
As discussed in the r11-7709 patch, we can now make sure that tsubst never sees a FLOAT_EXPR, much like its counterpart FIX_TRUNC_EXPR. gcc/cp/ChangeLog: * pt.c (tsubst_copy_and_build): Add assert.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/pt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 5e485f1..ea530ef 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -19770,6 +19770,8 @@ tsubst_copy_and_build (tree t,
complain|decltype_flag));
case FIX_TRUNC_EXPR:
+ case FLOAT_EXPR:
+ /* convert_like should have created an IMPLICIT_CONV_EXPR. */
gcc_unreachable ();
case ADDR_EXPR: