[LLVMbugs] [Bug 12662] New: c99 6.7.4 is not checked

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 25 16:08:40 PDT 2012


             Bug #: 12662
           Summary: c99 6.7.4 is not checked
           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 8454
  --> http://llvm.org/bugs/attachment.cgi?id=8454
test case

C99 6.7.4 states that inlined functions may not contain modifiable static
variables, and may not refer to static variables or functions elsewhere in the
source file where they are declared.

But the following code is accepted by clang with "-std=c99 -pedantic" without

clang version 3.1 (branches/release_31 154941)

GCC will give a warning:
gcc  -std=c99 -pedantic -c inline_static.c
inline_static.c: In function 'foo':
inline_static.c:2: warning: 'i' is static but declared in inline function 'foo'
which is not static

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