Issue 182724
Summary Declaration conditions that declare an array outside of the declarator are incorrectly rejected
Labels new issue
Assignees
Reporter Halalaluyafail3
    The following program demonstrates the issue:
```cpp
int main(){
    typedef int T[];
    if(T b={0});
}
```
Clang appears to interpret this as violating:
> The declarator shall not specify a function or an array.

Section 8.1 [stmt.pre] Paragraph 4 N5032

This program does not use the declarator to specify an array, instead it is specified in the decl-specifier-seq so it should be accepted as it is with GCC. See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124199
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to