re PR preprocessor/13726 (cpp -C -dI loses comments on same line as #include directives)
authorIan Lance Taylor <ian@airs.com>
Tue, 4 Oct 2005 18:06:19 +0000 (18:06 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 4 Oct 2005 18:06:19 +0000 (18:06 +0000)
commitcbc43ae091a468f438f851e454ac4454bb89f476
tree545ffe9bc98a6d6ff50b698d701fdeaba1622b1d
parent44d251729691376ab96450f3b8e580a87c055b95
re PR preprocessor/13726 (cpp -C -dI loses comments on same line as #include directives)

libcpp/
PR preprocessor/13726
* directives.c (check_eol_return_comments): New static function.
(parse_include): Add buf parameter.  Change all callers.
(do_include_common): If not discard comments, turn on
save_comments.  Pass collected comments to include callback.
* include/cpplib.h (struct cpp_callbacks): Add new parameter to
include callback: cpp_token list.
gcc/
PR preprocessor/13726
* c-ppoutput.c (cb_include): Add comments parameter, and print out
any comments passed in.
gcc/testsuite/
PR preprocessor/13726
* gcc.dg/cpp/cmdlne-dI-C.c: New test.
* gcc.dg/cpp/cmdlne-dI-C.h: New file.

From-SVN: r104951
gcc/ChangeLog
gcc/c-ppoutput.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/cmdlne-dI-C.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/cmdlne-dI-C.h [new file with mode: 0644]
libcpp/ChangeLog
libcpp/directives.c
libcpp/include/cpplib.h