In <URL:http://gcc.gnu.org/ml/gcc-bugs/1998-12/msg00022.html> it was reported that format attributes didn't work on methods. The example given now works, but it isn't documented that argument numbers must be increased in this case to allow for a hidden argument 1 (as discussed in that message). Release: 2.97 20010110 (experimental) Environment: System: Linux decomino 2.2.18 #1 Sun Jan 7 21:04:55 UTC 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-cvs/configure --prefix=/opt/gcc/snapshot --disable-shared --enable-threads=posix --with-system-zlib How-To-Repeat: See example in the indicated message.
Fix: Someone who knows C++ (so not me) should add documentation to the description of format attributes in extend.texi discussing their use on C++ methods.
Responsible-Changed-From-To: unassigned->bje Responsible-Changed-Why: I'll take it.
State-Changed-From-To: open->analyzed State-Changed-Why: Legit doc-bug.
State-Changed-From-To: analyzed->feedback State-Changed-Why: Patch posted to gcc-patches on 2002-02-18, pending approval.
From: bje@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/1607 Date: 18 Feb 2003 10:51:58 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: bje@gcc.gnu.org 2003-02-18 10:51:58 Modified files: gcc : ChangeLog gcc/doc : extend.texi Log message: PR c++/1607 * doc/extend.texi (Function Attributes): Document the effect of the C++ "this" parameter on the counting of arguments for the "format" and "format_arg" attributes. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.16759&r2=1.16760 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/extend.texi.diff?cvsroot=gcc&r1=1.120&r2=1.121
State-Changed-From-To: feedback->closed State-Changed-Why: Patch committed.
The fix for this looks small for 3.3.1 and there was another report about it see PR11191.
*** Bug 11191 has been marked as a duplicate of this bug. ***
Ben could you ask for approval for 3.3 since this is doc patch and there have been a bug report after this was closed asking how to use the format attributs on methods inside a class. Thanks, Andrew Pinski
Subject: Bug 1607 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: mmitchel@gcc.gnu.org 2003-07-11 22:13:43 Modified files: gcc : ChangeLog gcc/doc : extend.texi Log message: PR c++/1607 * doc/extend.texi (Function Attributes): Document the effect of the C++ "this" parameter on the counting of arguments for the "format" and "format_arg" attributes. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.650&r2=1.16114.2.651 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/extend.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.109.2.19&r2=1.109.2.20
Fixed in GCC 3.3.1, GCC 3.4.
*** Bug 18605 has been marked as a duplicate of this bug. ***