This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.92.2 c++ warning 'too many arguments for format' invalid?
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 2.92.2 c++ warning 'too many arguments for format' invalid?
- From: Marty Fouts <marty at dotcast dot net>
- Date: 25 Jan 2000 16:28:02 -0800
The attached program, when compiled using gcc 2.95.2 and the command
line given in the comment produces the warning message in the comment.
It also appears that under some circumstances, that I am unable to
reproduce yet, no bar.o file is produced. Changing 'printf' to nearly
anything else seems to cause the warning message to go away.
Is this a compiler related bug?
Marty
----- cut here for bar.cpp -----
/*
g++ -Wall -g -c bar.cpp
bar.cpp: In function `void bar()':
bar.cpp:8: warning: too many arguments for format
Compilation finished at Tue Jan 25 16:20:59
*/
class foo {
public:
static void printf(const char *f, ...);
};
void bar()
{
foo::printf("hi", "test");
}
----- end here for bar.cpp -----