[PATCH] #assert becomes macro-like
authorNathan Sidwell <nathan@acm.org>
Mon, 20 Aug 2018 12:39:36 +0000 (12:39 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 20 Aug 2018 12:39:36 +0000 (12:39 +0000)
commit3fb558b154f795983ae6a9dd6478e18a2c846584
tree2c06bad74d6dafddb11979c263020425a716902c
parentb655b8fc7eb4af02231fa0105dddd90a8cfceea1
[PATCH] #assert becomes macro-like

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01140.html
libcpp/
* include/cpp-id-data.h (struct answer): Delete.
* include/cpplib.h (struct answer): Don't forward-declare.
(enum cpp_macro_kind): Add cmk_assert.
(struct cpp_macro): Union parms and next assert chain.
(union _cpp_hashnode_value): 'answer' field is cpp_macro.
* directives.c (parse_answer): Convert to use cpp_macro. Return
true on success.
(parse_assertion, find_answer, _cpp_test_assertion, cpp_do_assert)
(cpp_do_unassert): Convert to use cpp_macro.
* macro.c (warn_of_redefinition, _cpp_new_macro)
(check_trad_stringification, cpp_macro_definition): Adjust macro
parm access.
* traditional.c (_cpp_replacement_text_len)
(_cpp_copy_replacement_text, _cpp_create_trad_definition): Likewise.
gcc/c-family/
* c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
access.

From-SVN: r263658
gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c
libcpp/ChangeLog
libcpp/directives.c
libcpp/include/cpp-id-data.h
libcpp/include/cpplib.h
libcpp/macro.c
libcpp/traditional.c