https://llvm.org/bugs/show_bug.cgi?id=25467
Bug ID: 25467 Summary: Warn on pointer to bool conversion Product: clang Version: 3.6 Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: ma...@braunis.de CC: llvm-bugs@lists.llvm.org Classification: Unclassified C/C++ have implicit conversions from pointers too bool. While this is nice for if() statements, this often not useful in other contexts such as function arguments, like the following example (which emits no warning with -Weverything): void print(bool verbose); void func(void *pointer) { print(pointer); } It would be nice to provide a warning for these cases. Note that -Wpointer-bool-conversion already exists but seems to deal with the "if (function)" case where the programming forgot the function call braces and the function pointer degrades to a bool. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs