This is the mail archive of the 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]

Attribute questions

1.The manual says that the `unused' attribute applied to functions
  is not supported by G++ "as definitions without parameters are
  valid in C++".  This seems confused.  The `unused' attribute
  applied to a function means that the function is not used; what,
  if anything, has this to do with its parameters?

2.Do people really use "prefix attributes"?  They are undocumented,
  as far as I can tell.  (This is the bit where you fix attributes
  in with the decl-specifier-seq in a declaration, like this:

    void __attribute__ ((pure)) f();

  Very ugly.  I expect we daren't remove these, right?

3. The manual contains anti-#pragma rhetoric.  As far as I can tell,
   that rhetoric isn't really longer valid.  The manual says that
   #pragma can't be generated from a macro, but in C99, _Pragma
   solves this problem.  The manual also says that you can't have
   any idea what another compiler will do with the same #pragma.
   I don't think you can have a whole lot of ideas about what
   another compiler will do with __attribute__ ((pure)) either.
   The only safe way to use either if as the output of macros that
   are conditionalized on the compiler that you are using.

   Can we just remove this bit of editorialization from the macro?

Mark Mitchell      
CodeSourcery, LLC  

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