[LLVMbugs] [Bug 11162] New: Issues with -Wconversion (from g++.old-deja/g++.other/null1.C)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 17 19:33:24 PDT 2011


           Summary: Issues with -Wconversion (from
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

Test can be accessed at
; issues with output:

1. -Wconversion warnings print the macro expansion of NULL, which is completely
<stdin>:26:11: warning: implicit conversion of NULL constant to integer
  int i = NULL; // { dg-warning "" } converting NULL to non-pointer type
      ~   ^~~~
note: expanded from macro: NULL
#define NULL __null

2. We miss warnings for some cases; for example, no (relevant) warnings for the
following with -Weverything:
float f() {
float z = __null;
int x = -__null;
int arr[2]; arr[__null] = 10;
return z+x+arr[0];

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