[LLVMbugs] [Bug 12663] New: Failure to diagnose violation of C99 6.7.5.2 constraint

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 25 16:27:47 PDT 2012


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: unassignedclangbugs at nondot.org
        ReportedBy: weimingz at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu
    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.



More information about the llvm-bugs mailing list