This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53207] New: bool conversion on return


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]