[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
http://llvm.org/bugs/show_bug.cgi?id=11162
Summary: Issues with -Wconversion (from
g++.old-deja/g++.other/null1.C)
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
http://llvm.org/viewvc/llvm-project/clang-tests/trunk/gcc-4_2-testsuite/src/g%2B%2B.old-deja/g%2B%2B.other/null1.C?revision=109903&view=markup
; issues with output:
1. -Wconversion warnings print the macro expansion of NULL, which is completely
useless:
<stdin>:26:11: warning: implicit conversion of NULL constant to integer
[-Wconversion]
int i = NULL; // { dg-warning "" } converting NULL to non-pointer type
~ ^~~~
/Volumes/storage/llvmbin/Release+Asserts/bin/../lib/clang/3.1/include/stddef.h:47:14:
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