[LLVMbugs] [Bug 3077] New: -pedantic-errors unusable on NetBSD
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Nov 15 23:55:20 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3077
Summary: -pedantic-errors unusable on NetBSD
Product: clang
Version: unspecified
Platform: PC
OS/Version: NetBSD
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: neil at daikokuya.co.uk
CC: llvmbugs at cs.uiuc.edu
-pedantic-errors fails on code that compiles cleanly with GCC, because of
constructs in system headers. For example:
lib/cfe/semantics.c:110:22: error: extension used
COMPILE_TIME_ASSERT (offsetof (a, b) == 0);
^
so something seems wrong with diagnosing offsetof; clearly not an extension.
Also
/usr/include/sys/bswap.h:20:28: error: extension used
uint16_t bswap16(uint16_t) __RENAME(__bswap16) __attribute__((__const__));
^
/usr/include/sys/endian.h:203:1: warning: extension used
__GEN_ENDIAN_ENC(16, be)
^
__RENAME is used in sysheaders and expands to
__asm ("_foo")
The other macro is defined like so:
#define __GEN_ENDIAN_DEC(bits, endian) \
static __inline __unused uint ## bits ## _t \
endian ## bits ## dec(const void *buf) \
{ \
uint ## bits ## _t u; \
__builtin_memcpy(&u, buf, sizeof(u)); \
return endian ## bits ## toh (u); \
}
--
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