cpplex.c (_cpp_lex_token): Handle directives in macro arguments.
commite808ec9c71e52aa64bdb4579ad2ef75802b7bcb5
authorNeil Booth <neil@daikokuya.demon.co.uk>
Wed, 27 Feb 2002 07:24:53 +0000 (27 07:24 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Wed, 27 Feb 2002 07:24:53 +0000 (27 07:24 +0000)
tree7ffd19f1f5d3104b1545c9af4c64c746cda65cbc
parentf585a35687df424814b57fd201253c11a19795f5
cpplex.c (_cpp_lex_token): Handle directives in macro arguments.

* 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.

From-SVN: r50091
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]