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

           Summary: clang does not allow VLA in unions/structs as gcc does
                    (violates C99)
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: missing-feature
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


gcc accepts this code:

int
__xuname(int namesize, void *namebuf)
{
        struct xutsname {
                char    sysname[namesize];      /* Name of this OS. */
        } *name;
}

which clang refuses with:

const.c:5:25: error: arrays with static storage duration must have constant
integer length
                char    sysname[namesize];      /* Name of this OS. */
                                        ^~~~~~~

this violates C99 but it is needed to get full gcc compatibility


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