[PATCH 0/7] make predefined macros more builtin

[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 macro 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 two functions:
predefine() & predefinef() which allow to directly add the
definition of a simple macro (without arg and with a single
number or ident as definition). It then contains a conversion
of the concerned predefined macros followed by some cleanups.


Luc Van Oostenryck (7):
  builtin: add testcase for builtin macro expansion
  builtin: extract do_define() from do_handle_define()
  builtin: add predefine() & predefinef()
  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                             | 179 ++++++++++++++----------------
 lib.h                             |   2 +
 pre-process.c                     | 124 ++++++++++++++++-----
 validation/preprocessor/builtin.c |  17 +++
 5 files changed, 203 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