diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2016-08-25 12:53:08 +0300 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2016-08-25 19:55:37 +0300 |
commit | 4fab91605a6bcd0c303bcbc292a8bffcf27b3a27 (patch) | |
tree | 9a25f7df6103854aa4b78a0ec07a3760fa374734 /scripts/genksyms | |
parent | dee81e9886748594babac67c14b0f720148e255d (diff) | |
download | linux-4fab91605a6bcd0c303bcbc292a8bffcf27b3a27.tar.xz |
kbuild: genksyms fix for typeof handling
The tokenizer misses counting an open-parenthesis when parsing a
non-trivial typeof beginning with an open-parenthesis. This function
in include/linux/ceph/libceph.h
static type *lookup_##name(struct rb_root *root,
typeof(((type *)0)->keyfld) key)
When instantiated in net/ceph/mon_client.c, causes subsequent symbols
including an EXPORT_SYMBOL in that file to be lost.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/genksyms')
-rw-r--r-- | scripts/genksyms/lex.l | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l index e583565f2011..5235aa507ba5 100644 --- a/scripts/genksyms/lex.l +++ b/scripts/genksyms/lex.l @@ -289,6 +289,23 @@ repeat: } break; + case ST_TYPEOF_1: + if (token == IDENT) + { + if (is_reserved_word(yytext, yyleng) + || find_symbol(yytext, SYM_TYPEDEF, 1)) + { + yyless(0); + unput('('); + lexstate = ST_NORMAL; + token = TYPEOF_KEYW; + break; + } + _APP("(", 1); + } + lexstate = ST_TYPEOF; + /* FALLTHRU */ + case ST_TYPEOF: switch (token) { @@ -313,24 +330,6 @@ repeat: } break; - case ST_TYPEOF_1: - if (token == IDENT) - { - if (is_reserved_word(yytext, yyleng) - || find_symbol(yytext, SYM_TYPEDEF, 1)) - { - yyless(0); - unput('('); - lexstate = ST_NORMAL; - token = TYPEOF_KEYW; - break; - } - _APP("(", 1); - } - APP; - lexstate = ST_TYPEOF; - goto repeat; - case ST_BRACKET: APP; switch (token) |