This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug web/13161] Documentation update "Specifying Attributes of Variables"
- From: "eddy at klopper dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2003 22:59:48 -0000
- Subject: [Bug web/13161] Documentation update "Specifying Attributes of Variables"
- References: <20031122164734.13161.eddy@klopper.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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