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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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

Reply via email to