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

             Bug #: 12663
           Summary: Failure to diagnose violation of C99 6.7.5.2
                    constraint
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Created attachment 8456
  --> http://llvm.org/bugs/attachment.cgi?id=8456
test case

clang version 3.1 (branches/release_31 154941)

C99 6.7.5.2 constrains the array declaration syntax.
http://c0x.coding-guidelines.com/6.7.5.2.html

But clang fails to diagnose the violations for the following code:

struct { int i; char a[static 5]; } s;

void foo(int n[][restrict static 3]){
}

gcc  -std=c99 -pedantic -c c99_6752.c 
c99_6752.c:1: error: static or type qualifiers in non-parameter array
declarator
c99_6752.c:3: error: static or type qualifiers in non-parameter array
declarator

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