diff options
author | Joseph Myers <joseph@codesourcery.com> | 2023-05-15 23:17:48 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2023-05-15 23:17:48 +0000 |
commit | d62d5686f41bb4ea50b8de640fac51decd24199a (patch) | |
tree | 497c7c56004b5d89d717108bd9ef60777615ca54 /gcc/c/c-lang.cc | |
parent | 2f27218ced2a23819c8fe8ba30ae74911b2c3cf1 (diff) | |
download | gcc-d62d5686f41bb4ea50b8de640fac51decd24199a.zip gcc-d62d5686f41bb4ea50b8de640fac51decd24199a.tar.gz gcc-d62d5686f41bb4ea50b8de640fac51decd24199a.tar.bz2 |
c: Ignore _Atomic on function return type for C2x
For C2x it was decided that _Atomic would be completely ignored on
function return types (just as was done for qualifiers in C11 DR#423),
to eliminate the potential for an rvalue returned by a function having
_Atomic-qualified type when an rvalue resulting from lvalue-to-rvalue
conversion could not have such a type. Implement this for GCC.
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
gcc/c/
* c-decl.cc (grokdeclarator): Ignore _Atomic on function return
type for C2x.
gcc/testsuite/
* gcc.dg/qual-return-9.c, gcc.dg/qual-return-10.c: New tests.
Diffstat (limited to 'gcc/c/c-lang.cc')
0 files changed, 0 insertions, 0 deletions