This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Prefix attributes vs. grammar


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]