Issue |
158030
|
Summary |
-Wold-style-declaration: Add diagnostic
|
Labels |
new issue
|
Assignees |
|
Reporter |
alejandro-colomar
|
Hi!
GCC has this diagnostic for obsolescent uses of storage class specifiers not the first specifier in a declaration.
```c
typedef int ti;
int typedef it;
static int si;
int static is;
```
```sh
alx@debian:~/tmp$ gcc -S -Wold-style-declaration reversed.c
reversed.c:2:1: warning: ‘typedef’ is not at beginning of declaration [-Wold-style-declaration]
2 | int typedef it;
| ^~~
reversed.c:5:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
5 | int static is;
| ^~~
alx@debian:~/tmp$ clang -S -Weverything reversed.c -Wno-unused
alx@debian:~/tmp$
```
Would you mind adding this diagnostic?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs