-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerdiverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
Hi!
GCC has this diagnostic for obsolescent uses of storage class specifiers not the first specifier in a declaration.
typedef int ti;
int typedef it;
static int si;
int static is;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?
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerdiverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue