<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Wnull-conversion warnings are no longer reported for `char c = NULL`"
href="https://llvm.org/bugs/show_bug.cgi?id=31842">31842</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-Wnull-conversion warnings are no longer reported for `char c = NULL`
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cpeterson@mozilla.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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:
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=778984">https://bugzilla.mozilla.org/show_bug.cgi?id=778984</a>
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;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>