aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-10-28 19:02:29 -0400
committerMarek Polacek <polacek@redhat.com>2020-10-29 14:06:13 -0400
commit79991e2348a864ace6ea2bf108a7502862f1129f (patch)
treea1208522e1a5783776514985cc2371947e4be5dc /gcc/cp/parser.c
parente1344fe7b6a96966281c78e46e777b456d5c2e19 (diff)
downloadgcc-79991e2348a864ace6ea2bf108a7502862f1129f.zip
gcc-79991e2348a864ace6ea2bf108a7502862f1129f.tar.gz
gcc-79991e2348a864ace6ea2bf108a7502862f1129f.tar.bz2
c++: Reject float <=> enum.
As [depr.arith.conv.enum] says, these are ill-formed. gcc/cp/ChangeLog: * typeck.c (do_warn_enum_conversions): Don't warn for SPACESHIP_EXPR. (cp_build_binary_op): Reject float <=> enum or enum <=> float. Use CP_INTEGRAL_TYPE_P instead of INTEGRAL_OR_ENUMERATION_TYPE_P. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/enum-conv1.C: Remove unused code. * g++.dg/cpp2a/spaceship-err5.C: New test.
Diffstat (limited to 'gcc/cp/parser.c')
0 files changed, 0 insertions, 0 deletions