diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2010-09-29 18:18:38 +0000 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2010-09-29 20:18:38 +0200 |
commit | d687413849f10f957c782eb4de2a54f3e78a7aae (patch) | |
tree | a94ac27b289fa25455ae4117a0a74ade6430a227 /libcpp/internal.h | |
parent | a0c6102d2935c97d834296038b1485f8841aa708 (diff) | |
download | gcc-d687413849f10f957c782eb4de2a54f3e78a7aae.zip gcc-d687413849f10f957c782eb4de2a54f3e78a7aae.tar.gz gcc-d687413849f10f957c782eb4de2a54f3e78a7aae.tar.bz2 |
re PR preprocessor/45362 (Dangling reference about saved cpp_macro for push/pop macro)
2010-09-29 Kai Tietz <kai.tietz@onevision.com>
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.
From-SVN: r164729
Diffstat (limited to 'libcpp/internal.h')
-rw-r--r-- | libcpp/internal.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h index e0ac285..d2872c4 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. |