https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114808
--- Comment #5 from Halalaluyafail3 <luigighiron at gmail dot com> --- I made this bug report because of the warning that clang has, but the following paragraph may allow this: > If, in the declaration "T D1", D1 has the form > D ( parameter-type-list ) > or > D ( identifier-list opt ) > and the type specified for ident in the declaration "T D" is > "derived-declarator-type-list T", then the type specified for > ident is "derived-declarator-type-list function returning the > unqualified version of T". Section 6.7.6.3 "Function declarators (including prototypes)" Paragraph 4 ISO/IEC 9899:2018 GCC seems to be using this to not make a diagnostic here, e.g. it warns with a return type of _Atomic void in C17 mode but not in C23 mode where the text here was updated to indicate that the result is the unqualified and non-atomic version of T. If this would make the text talking about the return type of the function refer to the unqualified return type then this should be allowed I think, and I will make a bug report to clang to get this diagnostic changed.