[PATCH 0/7] make predefined macros more built-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The current mechanism used for predefined macros is to first
compose a buffer with the textual definition of the macro:
        #define <name> <value>
and then tokenize it. It's quite powerful/flexible but for
small, simple predefined macros it's a bit sad to have to
go throught this textual representation when we could directly
define them via create/bind_symbol().

This series does exactly this: it adds a function:
predefine() which allow to directly add the definition of a
simple macro (without args and with a single number or ident
as definition). It then contains the conversion of the concerned
predefined macros and is followed by some cleanups.

Changes since v1:
* do not use asprintf() anymore
* merge predefine() & predefinef()
* add a note about the Blackfin's builtins being now
  unconditionally declared.

Thanks to Ramsay Jones for the review.

--
Luc Van Oostenryck (7):
  builtin: add testcase for builtin macro expansion
  builtin: extract do_define() from do_handle_define()
  builtin: add predefine()
  builtin: directly predefine builtin macros
  builtin: consolidate predefined_macros()
  builtin: switch calling order of predefined_macros() & friends
  builtin: merge declare_builtin_function() with declare_builtins()

 builtin.c                         |   5 +
 lib.c                             | 178 ++++++++++++++----------------
 lib.h                             |   1 +
 pre-process.c                     | 105 +++++++++++++-----
 validation/preprocessor/builtin.c |  17 +++
 5 files changed, 182 insertions(+), 124 deletions(-)
 create mode 100644 validation/preprocessor/builtin.c

-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux