Skip to content

Commit 2e0d737

Browse files
jbeulichmichal42
authored andcommitted
kconfig: don't silently ignore unhandled characters
At the very least we should tell people that what they wrote is not what the utility understands. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent fa75a72 commit 2e0d737

File tree

2 files changed

+113
-89
lines changed

2 files changed

+113
-89
lines changed

scripts/kconfig/zconf.l

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ n [A-Za-z0-9_]
141141
}
142142
#.* /* comment */
143143
\\\n current_file->lineno++;
144-
.
144+
[[:blank:]]+
145+
. {
146+
fprintf(stderr,
147+
"%s:%d:warning: ignoring unsupported character '%c'\n",
148+
zconf_curname(), zconf_lineno(), *yytext);
149+
}
145150
<<EOF>> {
146151
BEGIN(INITIAL);
147152
}

0 commit comments

Comments
 (0)