This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Triage: PR7385
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: <mark at codesourcery dot com>, <gcc at gcc dot gnu dot org>
- Date: Sat, 2 Nov 2002 03:05:05 +0000 (GMT)
- Subject: Re: Triage: PR7385
On 2 Nov 2002, Gabriel Dos Reis wrote:
> On a wider ground, I would like us to have a coherent approach to the
> whole attribute thingy, have them match documentation (either fix
> the documentation or fix the code); but most importantly have a less
> convoluted syntax for all that stuff. I think this is something we
> can consider for 3.4 after we all agree on what the C and C++
> front-ends should say (with a less convoluted syntax).
The following subset of the syntax works, has the full expressive power
and avoids most of the parsing ambiguities: prefix attributes (on
declarations and subdeclarators) and attributes after the initial "enum",
"struct" or "union" keyword. (This ignores attributes on labels.)
Postfix attributes however are what the docs have generally shown, and
though they apply to the declaration the position makes them look like
they should apply to the declarator (and applied to function declarators,
C++ has the cv-qualifier-seq syntax in the same place that does apply to
the declarator). Attributes on structures after the closing brace
conflict with other attributes in the sequence of declaration specifiers.
--
Joseph S. Myers
jsm28@cam.ac.uk