http://llvm.org/bugs/show_bug.cgi?id=12662
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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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
warning.
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs