[Bug c/82679] Uses of typedefs of arrays of _Atomic-qualified types are rejected

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 23 14:50:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82679

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
GCC is correct here, and this behavior is intentional:

  /* Applying the _Atomic qualifier to an array type (through the use
     of typedefs or typeof) must be detected here.  If the qualifier
     is introduced later, any appearance of applying it to an array is
     actually applying it to an element of that array.  */
  if (atomicp && TREE_CODE (type) == ARRAY_TYPE)
    error_at (loc, "%<_Atomic%>-qualified array type");


More information about the Gcc-bugs mailing list