[LLVMbugs] [Bug 3371] New: clang rejects pointer arithmetic code ( from the Linux kernel)
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Jan 22 06:05:11 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3371
Summary: clang rejects pointer arithmetic code (from the Linux
kernel)
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: bagnara at cs.unipr.it
CC: llvmbugs at cs.uiuc.edu, bolzoni at cs.unipr.it
$ cat /tmp/bug4.c
void
sys_init_module() {
extern int (*init)(void);
if (init+0 <= init) {
;
}
}
$ gcc -W -Wall -c /tmp/bug4.c
$ clang /tmp/bug4.c
/tmp/bug4.c:6:11: error: arithmetic on pointer to function type 'int (*)(void)'
if (init+0 <= init) {
~~~~^
1 diagnostic generated.
$
--
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