Message ID | 20250113150253.3097820-4-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | genksyms: fix conflicts and syntax errors in parser | expand |
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
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@kernel.org> --- scripts/genksyms/parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)