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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-15
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
I'll confirm this.

I would suggest to consider adopting the convention used by other back ends
(e.g, mips or i386) for spelling attribute target: "attribute %<target%>"
(i.e., the word attribute is not quoted but the keyword target is), and/or for
attributes in general used by the middle-end ("%<name%> attribute").

This convention is helpful because there are at least two ways of spelling an
attribute in user code, depending on the language:

__attribute__ ((target)) in both C and C++
[[gnu::target]] in C++

C hasn't adopted the C++ syntax but a proposal for including it in C2X has been
submitted and favorably received.  At the same time, some people on the C
committee have been arguing for alternate syntax along the lines of

_Attribute (target)

If this were to adopted (either in favor of the C++ notation or in addition to
it), there would be three different ways to spell the same thing.

Unless GCC can determine and use what appears in the source code using a
generic spelling is less confusing or misleading.

Reply via email to