r263640 - in /trunk: gcc/c-family/ChangeLog gcc...

nathan@gcc.gnu.org nathan@gcc.gnu.org
Fri Aug 17 23:18:00 GMT 2018


Author: nathan
Date: Fri Aug 17 23:18:11 2018
New Revision: 263640

URL: https://gcc.gnu.org/viewcvs?rev=263640&root=gcc&view=rev
Log:
[PATCH] Adjust lazy macro definition

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01072.html
	libcpp/
	* include/cpplib.h (struct cpp_callbacks): Replace
	user_builtin_macro with user_lazy_macro.
	(struct cpp_macro): add lazy field.
	(enum cpp_builtin_type): Remove BT_FIRST_USER, BT_LAST_USER.
	(cpp_define_lazily): Declare.
	* macro.c (enter_macro_context) Use _cpp_maybe_notify_macro_use.
	(warn_of_redefinition): Use cpp_builtin_macro_p, directly call
	user_lazy_macro hook.
	(_cpp_new_macro): Clear lazy field.
	(cpp_define_lazily): Define.
	(_cpp_notify_macro_use): Adjust lazy definition code.
	(cpp_macro_definition): No need to do lazy definition here.
	* pch.c (write_macdef, save_macros): Likewise.
	gcc/c-family/
	* c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
	field.
	(laxy_hex_fp_value_count): Make unsigned.
	(lazy_hex_fp_value): Provided with macro & lazy number.  Directly
	manipulate the macro.
	(builtin_defin_with_hex_fp_value): Adjust callback name, use
	cpp_define_lazily.

Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-cppbuiltin.c
    trunk/libcpp/ChangeLog
    trunk/libcpp/include/cpplib.h
    trunk/libcpp/macro.c
    trunk/libcpp/pch.c



More information about the Gcc-cvs mailing list