[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250113150253.3097820-4-masahiroy@kernel.org>
Date: Tue, 14 Jan 2025 00:00:41 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Masahiro Yamada <masahiroy@...nel.org>
Subject: [PATCH 03/17] genksyms: reduce type_qualifier directly to decl_specifier
A type_qualifier (const, volatile, etc.) is not a type_specifier.
According to K&R [1], a type-qualifier should be directly reduced to
a declaration-specifier.
<declaration-specifier> ::= <storage-class-specifier>
| <type-specifier>
| <type-qualifier>
[1]: https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm
Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---
scripts/genksyms/parse.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 8f62b9f0d99c..20cb3db7f149 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -211,6 +211,7 @@ decl_specifier:
$$ = $1;
}
| type_specifier
+ | type_qualifier
;
storage_class_specifier:
@@ -223,7 +224,6 @@ storage_class_specifier:
type_specifier:
simple_type_specifier
- | type_qualifier
| TYPEOF_KEYW '(' parameter_declaration ')'
| TYPEOF_PHRASE
--
2.43.0
Powered by blists - more mailing lists