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]

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


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