<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - New diagnostic -Wzero-as-null-pointer-constant warns on code in system headers."
   href="https://bugs.llvm.org/show_bug.cgi?id=36520">36520</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>New diagnostic -Wzero-as-null-pointer-constant warns on code in system headers.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lukasza@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is a follow-up for <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - New diagnostic -Wzero-as-null-pointer-constant warns on macros expanded from system headers."
   href="show_bug.cgi?id=33771">https://bugs.llvm.org/show_bug.cgi?id=33771</a> - even
after this bug got fixed, some system headers result in warnings/errors:

    In file included from ../../base/message_loop/message_pump_glib.cc:10:
    In file included from
../../build/linux/debian_stretch_amd64-sysroot/usr/include/glib-2.0/glib.h:50:
    In file included from
../../build/linux/debian_stretch_amd64-sysroot/usr/include/glib-2.0/glib/ghash.h:33:
    In file included from
../../build/linux/debian_stretch_amd64-sysroot/usr/include/glib-2.0/glib/glist.h:32:
   
../../build/linux/debian_stretch_amd64-sysroot/usr/include/glib-2.0/glib/gmem.h:192:10:
error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant]
      *ptr = NULL;
             ^~~~
             nullptr
   
../../third_party/llvm-build/Release+Asserts/lib/clang/7.0.0/include/stddef.h:100:18:
note: expanded from macro 'NULL'
    #    define NULL __null

base/message_loop/message_pump_glib.cc looks like this (in particular, note
that |#include <foo.h>| rather than |#include "foo.h"| was used):

    ...    
    #include "base/message_loop/message_pump_glib.h"

    #include <fcntl.h>
    #include <math.h>

    #include <glib.h>  // <--- THIS PULLS IN SYSTEM HEADERS THAT RESULT IN THE
WARNING

    #include "base/lazy_instance.h"
    #include "base/logging.h"
    ...</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>