[clang] [clang] support Wold-style-declaration (PR #78837)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 20 12:01:00 PST 2024
================
@@ -3348,6 +3348,7 @@ void Parser::ParseDeclarationSpecifiers(
while (true) {
bool isInvalid = false;
bool isStorageClass = false;
+ bool isFunctionSpecifier = false;
----------------
AaronBallman wrote:
Hmmm, what's obsoleted are storage class specifiers that are not at the start of the declaration. e.g.,
```
int static i = 12;
```
and function specifiers are not storage class specifiers. So technically, this is not obsolete:
```
void _Noreturn func(void);
```
GCC does warn about this, and I think that's reasonable to also mimic. I'll check with WG14 whether function specifiers should also be obsoleted similar to storage class specifiers.
https://github.com/llvm/llvm-project/pull/78837
More information about the cfe-commits
mailing list