Bug 1607 - [3.3 only] Format attributes on methods undocumented
Summary: [3.3 only] Format attributes on methods undocumented
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 2.97
: P3 normal
Target Milestone: 3.3.1
Assignee: Ben Elliston
URL:
Keywords: documentation
: 11191 18605 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-01-10 09:36 UTC by Joseph S. Myers
Modified: 2006-11-08 00:57 UTC (History)
4 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S. Myers 2001-01-10 09:36:00 UTC
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.
Comment 1 Joseph S. Myers 2001-01-10 09:36:00 UTC
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.
Comment 2 Ben Elliston 2003-02-18 01:16:44 UTC
Responsible-Changed-From-To: unassigned->bje
Responsible-Changed-Why: I'll take it.
Comment 3 Ben Elliston 2003-02-18 01:16:44 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Legit doc-bug.
Comment 4 Ben Elliston 2003-02-18 02:35:06 UTC
State-Changed-From-To: analyzed->feedback
State-Changed-Why: Patch posted to gcc-patches on 2002-02-18, pending approval.
Comment 5 Ben Elliston 2003-02-18 10:51:58 UTC
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
 
Comment 6 Ben Elliston 2003-02-18 13:26:04 UTC
State-Changed-From-To: feedback->closed
State-Changed-Why: Patch committed.
Comment 7 Andrew Pinski 2003-06-14 12:37:40 UTC
The fix for this looks small for 3.3.1  and there was another report about it see PR11191.
Comment 8 Andrew Pinski 2003-06-14 12:39:40 UTC
*** Bug 11191 has been marked as a duplicate of this bug. ***
Comment 9 Andrew Pinski 2003-07-11 14:48:52 UTC
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
Comment 10 GCC Commits 2003-07-11 22:13:45 UTC
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

Comment 11 Mark Mitchell 2003-07-11 22:14:16 UTC
Fixed in GCC 3.3.1, GCC 3.4.
Comment 12 Andrew Pinski 2004-11-22 13:07:30 UTC
*** Bug 18605 has been marked as a duplicate of this bug. ***