This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18605] __attribute__ ((format (printf, ...))) doesn't work in C++ methods
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2004 10:13:25 -0000
- Subject: [Bug c++/18605] __attribute__ ((format (printf, ...))) doesn't work in C++ methods
- References: <20041122091826.18605.mkaufmann@student.ethz.ch>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joseph at codesourcery dot com 2004-11-22 10:13 -------
Subject: Re: New: __attribute__ ((format (printf, ...)))
doesn't work in C++ methods
On Mon, 22 Nov 2004, mkaufmann at student dot ethz dot ch wrote:
> __attribute__(format(printf, ...)) works for C procedures, but not for C++
> methods. g++ counts the implicit "this" parameter, and therefore g++ only
> accepts declarations with wrong numbers:
The proper numbers to use are documented in the manual, and I don't think
it makes sense to break existing code in this regard - i.e., this should
be considered a duplicate of bug 1607.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18605