This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53207] New: bool conversion on return
- From: "hub at figuiere dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 May 2012 01:27:14 +0000
- Subject: [Bug c++/53207] New: bool conversion on return
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53207
Bug #: 53207
Summary: bool conversion on return
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hub@figuiere.net
Created attachment 27297
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27297
test case
in the following example, clang++ returns a warning about conversion of bool
literal to a point while g++ doesn't.
clang++ -Wall -Wextra -Wsign-compare -Wpointer-arith -Wchar-subscripts
-Wwrite-strings -Wmissing-noreturn -Wunused -Wpointer-arith -Wshadow -c
return-bool.cpp
return-bool.cpp:10:2: warning: initialization of pointer of type 'const char *'
from literal 'false' [-Wbool-conversions]
RETURN_IF_FAIL(flag,false);
^
return-bool.cpp:10:22: note: instantiated from:
RETURN_IF_FAIL(flag,false);
^
1 warning generated.