This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33588] New: gcc warns of (char*) conversion on client-side varargs funcs
- From: "stephan at s11n dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Sep 2007 16:29:32 -0000
- Subject: [Bug c++/33588] New: gcc warns of (char*) conversion on client-side varargs funcs
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
(i submitted this via gccbugs, but the script gave me no feedback about whether
the report was actually sent or not, so i'm re-posting here.)
gcc 4.2.1 appears to incorrectly(?) give a warning when a client-written
varargs func is passed a string literal (e.g. __FILE__) as one of the
arguments. e.g.
my_func( "format string: %s", __FILE__ )
warning: deprecated conversion from string constant to ?char'
Curiously, the warning is not emitted when printf() is used.
This apparently bogus warning causes -Werror builds (that is, all of my builds)
to fail.
i will attach a demo file after saving this bug (assuming bugzilla lets me,
otherwise i'll paste it in as a comment).
--
Summary: gcc warns of (char*) conversion on client-side varargs
funcs
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: stephan at s11n dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33588