[Linux-kernel-mentees] [Cocci] [RFC PATCH 12/25] parsing_c: cpp_token_c: Introduce MACROANNOTATION hint

Markus Elfring Markus.Elfring at web.de
Fri Apr 24 12:40:29 UTC 2020


> A better way of denoting attributes is to pass attribute information
> from SmPL to the C parser.

Such information sounds promising.


> However, a temporary solution is to introduce a MACROANNOTATION hint
> to cpp_token_c.ml so that the parser can identify attributes easily.

Have you got any development ideas which would not need the introduction
of “temporary” approaches?


> This hint can be used as follows in standard.h, the user provided
> macro-defs file or the given C file itself:
>
> 	#define __attribute_name MACROANNOTATION

Can it make sense to work with a function-like macro at such places?

 	#define USE_ANNOTATION(info) info ITEM_ANNOTATION

Regards,
Markus


More information about the Linux-kernel-mentees mailing list