* cpplex.c (_cpp_lex_token): Handle directives in macro
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Feb 2002 07:24:53 +0000 (07:24 +0000)
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Feb 2002 07:24:53 +0000 (07:24 +0000)
commitd6af03689afcb6d54e5ce66a399f68753a2aea3e
tree7ffd19f1f5d3104b1545c9af4c64c746cda65cbc
parentfc54b737e45b3feef050092c62be54cf1b81c5a7
* cpplex.c (_cpp_lex_token): Handle directives in macro
arguments.
* cpplib.c (_cpp_handle_directive): Save and restore state
if parsing macro args when entering a directive.
* cppmacro.c (collect_args): No need to handle directives
in macro arguments.
(enter_macro_context, replace_args): Use the original macro
definition in case it was redefined whilst collecting arguments.
doc:
* cpp.texi: Update.
testsuite:
* gcc.dg/cpp/undef1.c: Remove.
* gcc.dg/cpp/directiv.c: Update.
* gcc.dg/cpp/mac-dir-1.c, mac-dir-2.c: New tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50091 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cpplex.c
gcc/cpplib.c
gcc/cppmacro.c
gcc/doc/cpp.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/directiv.c
gcc/testsuite/gcc.dg/cpp/mac-dir-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/mac-dir-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/undef1.c [deleted file]