[LLVMbugs] [Bug 7113] New: Clang should warn on absurd implicit conversions to NULL
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue May 11 02:54:01 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7113
Summary: Clang should warn on absurd implicit conversions to
NULL
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chandlerc at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Because the programmer never in a million years wanted this to happen:
% cat t6.cc
#include <string>
std::string f() { return false; }
% ./bin/clang++ -fsyntax-only t6.cc
%
It seems reasonable to print a warning for false -> (char *)0, at least in C++
where converting implicitly to NULL can have such surprising side-effects.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list