This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Documentation "bug"
- From: Ethan Tira-Thompson <ejt at andrew dot cmu dot edu>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Jan 2005 15:07:17 -0500
- Subject: Documentation "bug"
Regarding:
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Attributes.html#Function%20Attributes
When using an attribute that take parameter arguments, such as the
format attribute, one needs to start counting parameters at *2* in C++
because (i'm assuming here) 'this' (the current object's address) is
argument 1.
This took me a while to figure out why I kept getting "error: format
string arg not a string type", but it seems to work now.
thanks,
-ethan