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: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs