From dc53324060f324e8af6867f57bf4891c13c6ef18 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 3 Apr 2014 14:46:37 -0700 Subject: genksyms: fix typeof() handling Recent increased use of typeof() throughout the tree resulted in a number of symbols (25 in a typical distro config of ours) not getting a proper CRC calculated for them anymore, due to the parser in genksyms not coping with several of these uses (interestingly in the majority of [if not all] cases the problem is due to the use of typeof() in code preceding a certain export, not in the declaration/definition of the exported function/object itself; I wasn't able to find a way to address this more general parser shortcoming). The use of parameter_declaration is a little more relaxed than would be ideal (permitting not just a bare type specification, but also one with identifier), but since the same code is being passed through an actual compiler, there's no apparent risk of allowing through any broken code. Otoh using parameter_declaration instead of the ad hoc "decl_specifier_seq '*'" / "decl_specifier_seq" pair allows all types to be handled rather than just plain ones and pointers to plain ones. Signed-off-by: Jan Beulich Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/genksyms/keywords.gperf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/genksyms/keywords.gperf') diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf index 3e77a943e7b7..a9096d993172 100644 --- a/scripts/genksyms/keywords.gperf +++ b/scripts/genksyms/keywords.gperf @@ -23,6 +23,8 @@ __inline, INLINE_KEYW __inline__, INLINE_KEYW __signed, SIGNED_KEYW __signed__, SIGNED_KEYW +__typeof, TYPEOF_KEYW +__typeof__, TYPEOF_KEYW __volatile, VOLATILE_KEYW __volatile__, VOLATILE_KEYW # According to rth, c99 defines _Bool, __restrict, __restrict__, restrict. KAO @@ -51,9 +53,8 @@ signed, SIGNED_KEYW static, STATIC_KEYW struct, STRUCT_KEYW typedef, TYPEDEF_KEYW +typeof, TYPEOF_KEYW union, UNION_KEYW unsigned, UNSIGNED_KEYW void, VOID_KEYW volatile, VOLATILE_KEYW -typeof, TYPEOF_KEYW -__typeof__, TYPEOF_KEYW -- cgit v1.2.1