[llvm-bugs] [Bug 31842] New: -Wnull-conversion warnings are no longer reported for `char c = NULL`
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 1 12:25:02 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31842
Bug ID: 31842
Summary: -Wnull-conversion warnings are no longer reported for
`char c = NULL`
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: cpeterson at mozilla.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
The following program used to report a -Wnull-conversion warning with whatever
clang version Apple was shipping in 2012:
warning: implicit conversion of NULL constant to 'char' [-Wnull-conversion]
I noted this in a Firefox bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=778984
With the latest clang version Apple is shipping (Apple LLVM version 8.0.0
(clang-800.0.42.1, Target: x86_64-apple-darwin16.4.0), the following program
produces no warnings, even with clang -Weverything:
#include <stdlib.h>
int main()
{
bool b = NULL; (void) b;
char c = NULL; (void) c;
int i = NULL; (void) i;
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170201/e656f9f5/attachment.html>
More information about the llvm-bugs
mailing list