This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Prefix attributes vs. grammar
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Subject: Re: Prefix attributes vs. grammar
- From: Ross Smith <ross dot s at ihug dot co dot nz>
- Date: Wed, 25 Jul 2001 14:56:30 +1200
- Organization: Ihug
- References: <603130000.996025596@warlock.codesourcery.com>
Mark Mitchell wrote:
>
> For example, is it an invariant that attributes in a declaration always
> apply to the declarator, and not to some part of the type of the
> declarator? If so, then there are types that you can only talk about with
> typedefs (because trying to name them any other way yields modification of
> the declarator). If not, then `void (stdcall * f) ()' and `void (*stdcall
> f)' are different (where `stdcall' is shorthand for the appropriate
> attribute stuff). According to Stan's proposal, these mean the same thing,
> which is OK with me, but certainly not obvious!
FWIW, Microsoft Visual C++ (compatibility with which is presumably the
goal of this particular bit of syntax) accepts only the first of those
two.
--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
"Unix has always lurked provocatively in the background of the operating
system wars, like the Russian Army." -- Neal Stephenson