[LLVMbugs] [Bug 2252] New: Unexpected diagnostics in PP expression
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Apr 26 00:04:07 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2252
Summary: Unexpected diagnostics in PP expression
Product: clang
Version: unspecified
Platform: PC
OS/Version: NetBSD
Status: NEW
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassignedbugs at nondot.org
ReportedBy: neil at daikokuya.co.uk
CC: llvmbugs at cs.uiuc.edu
For
#if -0x8000000000000000
#endif
Clang gives:
$ clang -pedantic-errors /tmp/bug.c
/tmp/bug.c:1:6: warning: integer constant is so large that it is unsigned
#if -0x8000000000000000
^
/tmp/bug.c:1:5: warning: integer overflow in preprocessor expression
#if -0x8000000000000000
^
2 diagnostics generated.
I don't think either of these is warranted.
It is true the integer is so large it is unsigned, but that is an expected
outcome for hex constants and shouldn't require a suffix - this is unlike
unsuffixed decimal constants.
The second diagnostic is simply wrong: unsigned arithmetic never overflows.
--
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