[Bug c++/33588] New: gcc warns of (char*) conversion on client-side varargs funcs
stephan at s11n dot net
gcc-bugzilla@gcc.gnu.org
Sat Sep 29 16:29:00 GMT 2007
(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
More information about the Gcc-bugs
mailing list