[LLVMbugs] [Bug 2747] New: ptr & 0 not considered as constant

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Sep 1 15:56:03 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2747

           Summary: ptr & 0 not considered as constant
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nunoplopes at sapo.pt
                CC: llvmbugs at cs.uiuc.edu


the following code is rejected by clang (with "initializer element is not a
compile-time constant"):

struct sym_reg {
        char nc_gpreg;
};

int sym_fw1a_scr[] = {
           ((int)(&((struct sym_reg *)0)->nc_gpreg)) & 0
};


-- 
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