From 0d601ff4cedb82181666d5bd62c07b497f9924f9 Mon Sep 17 00:00:00 2001 From: ktietz Date: Wed, 29 Sep 2010 18:18:38 +0000 Subject: 2010-09-29 Kai Tietz PR preprocessor/45362 * directives.c (cpp_pop_definition): Make static. (do_pragma_push_macro): Reworked to store text definition. (do_pragma_pop_macro): Add free text definition. (cpp_push_definition): Removed. * include/cpplib.h (cpp_push_definition): Removed. (cpp_pop_definition): Likewise. * internal.h (def_pragma_macro): Remove member 'value' and add new members 'definition', 'line', 'syshdr', 'sued' and 'is_undef'. * pch.c (_cpp_restore_pushed_macros): Rework to work on text definition and store additional macro flags. (_cpp_save_pushed_macros): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164729 138bc75d-0d04-0410-961f-82ee72b054a4 --- libcpp/internal.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libcpp/internal.h') diff --git a/libcpp/internal.h b/libcpp/internal.h index e0ac285d82c..d2872c4a11f 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -313,7 +313,17 @@ struct def_pragma_macro { /* Name of the macro. */ char *name; /* The stored macro content. */ - cpp_macro *value; + unsigned char *definition; + + /* Definition line number. */ + source_location line; + /* If macro defined in system header. */ + unsigned int syshdr : 1; + /* Nonzero if it has been expanded or had its existence tested. */ + unsigned int used : 1; + + /* Mark if we save an undefined macro. */ + unsigned int is_undef : 1; }; /* A cpp_reader encapsulates the "state" of a pre-processor run. -- cgit v1.2.1