[patch]: Add push_macro/pop_macro feature for all targets by moving it from C frontent into libcpp
Tom Tromey
tromey@redhat.com
Tue Nov 10 16:19:00 GMT 2009
>>>>> "Kai" == Kai Tietz <ktietz70@googlemail.com> writes:
Kai> ChangeLog for libcpp
Kai> 2009-11-03 Kai Tietz <kai.tietz@onevision.com>
Kai> * directives.c (do_pragma_push_macro): New pragma handler.
Kai> (do_pragma_pop_macro): Likewise.
Kai> (_cpp_init_internal_pragmas): Add push_macro and
Kai> pop_macro handler to internal pragmas.
Kai> (lex_macro_node_from_str): Removed.
Kai> (cpp_push_definition): Replace lex_macro_node_from_str
Kai> by _cpp_lex_identifier.
Kai> (cpp_pop_definition): Likewise.
Kai> * internal.h (_cpp_lex_identifier): New prototype.
Kai> (def_pragma_macro): New structure.
Kai> (cpp_reader): New member pushed_macros.
Kai> * lex.c (_cpp_lex_identifier): New function.
Kai> (lex_identifier_intern): New function.
Kai> * init.c (cpp_create_reader): Initialize pushed_macros
Kai> member.
Kai> (cpp_destroy): Free elements in pushed_macros member.
Kai> * pch.c (_cpp_save_pushed_macros): New function.
Kai> (_cpp_restore_pushed_macros): Likewise.
Kai> (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros.
Kai> (cpp_read_state): Use _cpp_restore_pushed_macros.
The libcpp parts are ok.
I can't approve the other bits.
Tom
More information about the Gcc-patches
mailing list