summaryrefslogtreecommitdiffstats
path: root/libcpp/include/cpp-id-data.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-19 17:10:56 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-19 17:10:56 +0000
commit941f2388c6654af085ec92de505bc6b53d90b5fa (patch)
tree311d607f4a7b5f177b00f2193802a219b80ccc5e /libcpp/include/cpp-id-data.h
parentecfab407adc29d593a981d8da42eb3095bf3a1ad (diff)
downloadppe42-gcc-941f2388c6654af085ec92de505bc6b53d90b5fa.tar.gz
ppe42-gcc-941f2388c6654af085ec92de505bc6b53d90b5fa.zip
libcpp:
PR preprocessor/20078 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens field. * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define. (struct cpp_token): Change flags to unsigned short. * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens. (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens. (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE tokens. * macro.c (macro_real_token_count): New. (enter_macro_context, replace_args): Use macro_real_token_count. (create_iso_definition): Record whitespace surrounding and digraph spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH. Set extra_tokens and save CPP_PASTE tokens with arg_no set for multiple consecutive ## tokens. (_cpp_create_definition): Initialize extra_tokens. (cpp_macro_definition): Use macro_real_token_count. gcc/testsuite: * gcc.dg/cpp/paste16.c, gcc.dg/cpp/redef4.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146352 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/include/cpp-id-data.h')
-rw-r--r--libcpp/include/cpp-id-data.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcpp/include/cpp-id-data.h b/libcpp/include/cpp-id-data.h
index afe4edad99e..029d424d511 100644
--- a/libcpp/include/cpp-id-data.h
+++ b/libcpp/include/cpp-id-data.h
@@ -75,4 +75,9 @@ struct cpp_macro GTY(())
/* Indicate which field of 'exp' is in use. */
unsigned int traditional : 1;
+
+ /* Indicate whether the tokens include extra CPP_PASTE tokens at the
+ end to track invalid redefinitions with consecutive CPP_PASTE
+ tokens. */
+ unsigned int extra_tokens : 1;
};
OpenPOWER on IntegriCloud