https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86221
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- The C17 specification for function return types says "function returning the unqualified version of T", not "function returning the unqualified, non-atomic version of T". I believe the normal rule applies that _Atomic, although syntactically a qualifier, is not treated as such unless explicitly stated otherwise (in line with the possibility that an atomic type has different size and alignment, for example, so a function returning an atomic type could quite possibly have a different ABI from a function returning the corresponding non-atomic type). So I believe GCC is correct to have the _Generic match with const, volatile and restrict but not _Atomic.