This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug web/13161] Documentation update "Specifying Attributes of Variables"


------- Additional Comments From eddy at klopper dot net  2003-11-22 22:59 -------
(In reply to comment #1)
> You cannot use the attribute unused in C++ (use unnamed agruments instead).

 Unnamed arguments in the prototyp doesn't inhibit the warning for me (gcc 
version 3.3.1 (mingw special 20030804-1))
 
 If unnamed arguments were a solution, then that should have been documented, 
but they doesn't seem to be.

> Also the attribute goes after the name of the variable.

 I'm not talking about variables, I'm talking about parameters (also known as 
formal arguments, just to that we're on the same page). The example as shown 
works. Yes, in every _other_ case (functions, structs, variables) the attribute 
goes after, but in this case -- and this is the whole point of adding this to 
the documentation -- the attribute, apparently, goes in front of the type.

 It works, so it's either a fluke or an undocumented(?) feature. Either way it 
should be documented (or made into an error). Personally I'm happy it works.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13161


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