aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-06-13 22:41:02 +0000
committerJoseph Myers <josmyers@redhat.com>2024-06-13 22:41:59 +0000
commit3bb21028698be33ae90115fce507f151182a4450 (patch)
treec345f0ca19de450844e135d1e0c4daf073f845c2 /gcc/expr.cc
parent8c9b4dff6298a203aba41c90377099f7ed678bde (diff)
downloadgcc-3bb21028698be33ae90115fce507f151182a4450.zip
gcc-3bb21028698be33ae90115fce507f151182a4450.tar.gz
gcc-3bb21028698be33ae90115fce507f151182a4450.tar.bz2
c: Implement C2Y complex increment/decrement support
Support for complex increment and decrement (previously supported as an extension) was voted into C2Y today (paper N3259). Thus, change the pedwarn to a pedwarn_c23 and add associated tests. Note: the type of the 1 to be added / subtracted is underspecified (to be addressed in a subsequent paper), but understood to be intended to be a real type (so the sign of a zero imaginary part is never changed) and this is what is implemented; the tests added include verifying that there is no undesired change to the sign of a zero imaginary part. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc/c/ * c-typeck.cc (build_unary_op): Use pedwarn_c23 for complex increment and decrement. gcc/testsuite/ * gcc.dg/c23-complex-1.c, gcc.dg/c23-complex-2.c, gcc.dg/c23-complex-3.c, gcc.dg/c23-complex-4.c, gcc.dg/c2y-complex-1.c, gcc.dg/c2y-complex-2.c: New tests.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions