aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/sancov_plugin.c
diff options
context:
space:
mode:
authorMasahiro Yamada <[email protected]>2025-01-13 15:00:55 +0000
committerMasahiro Yamada <[email protected]>2025-01-26 22:44:16 +0000
commita23d4c2f5b80a8dc5f1e40658abbe5983af1a0e9 (patch)
tree3e404c91ac4d14f4c0c2e15b34fdf792aeee390b /scripts/gcc-plugins/sancov_plugin.c
parentgenksyms: fix syntax error for builtin (u)int*x*_t types (diff)
downloadkernel-a23d4c2f5b80a8dc5f1e40658abbe5983af1a0e9.tar.gz
kernel-a23d4c2f5b80a8dc5f1e40658abbe5983af1a0e9.zip
genksyms: fix syntax error for attribute before init-declarator
A longstanding issue with genksyms is that it has hidden syntax errors. For example, genksyms fails to parse the following valid code: int x, __attribute__((__section__(".init.data")))y; Here, only 'y' is annotated by the attribute, although I am not aware of actual uses of this pattern in the kernel tree. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. $ echo 'int x, __attribute__((__section__(".init.data")))y;' | scripts/genksyms/genksyms -w <stdin>:1: syntax error This commit allows attributes to be placed between a comma and init_declarator. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Nicolas Schier <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/sancov_plugin.c')
0 files changed, 0 insertions, 0 deletions