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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-01-02
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
The grammar implies the original form of the alias-declaration should be
accepted with standard C++ attributes so I think it would make sense to accept
it with GNU attributes as well:

  alias-declaration:
    using identifier attribute-specifier-seq opt = defining-type-id;

  defining-type-id:
    defining-type-specifier-seq abstract-declarator opt

  defining-type-specifier-seq:
    defining-type-specifier attribute-specifier-seq opt
    defining-type-specifier defining-type-specifier-seq

With that, I would expect the following two declarations to be equivalent:

  template <class T>
  using U = __attribute__ ((__vector_size__ (8))) T;

  template <class T>
  using V = [[gnu::vector_size (8)]] T;

Here GCC rejects both forms while Clang accepts the GNU form but (ironically)
rejects the standard form.

Reply via email to