[LLVMbugs] [Bug 20584] New: No diagnostic for "static" in array bounds without size
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 7 20:26:07 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20584
Bug ID: 20584
Summary: No diagnostic for "static" in array bounds without
size
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: hstong at ca.ibm.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The syntax for a direct-declarator allows "static" within square brackets only
in cases where the size is specified.
As a syntax rule violation, a diagnostic is required.
### SOURCE:
$ cat bogusStatic.c
void f(int x[static]);
### COMPILER INVOCATION AND OUTPUT:
$ clang -cc1 -std=c99 -Wall -Wextra -pedantic-errors -x c bogusStatic.c ; echo
"rc=$?"
rc=0
### EXPECTED BEHAVIOUR:
Syntax error.
### COMPILER VERSION INFO:
$ clang -v
clang version 3.5.0 (trunk 214060)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Selected multilib: .;@m64
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140808/f29233f4/attachment.html>
More information about the llvm-bugs
mailing list