This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/13726] [3.4/4.0/4.1 regression]cpp -C -dI loses comments on same line as #include directives
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2005 18:06:26 -0000
- Subject: [Bug preprocessor/13726] [3.4/4.0/4.1 regression]cpp -C -dI loses comments on same line as #include directives
- References: <bug-13726-189@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from cvs-commit at gcc dot gnu dot org 2005-10-04 18:06 -------
Subject: Bug 13726
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: ian@gcc.gnu.org 2005-10-04 18:06:20
Modified files:
gcc : ChangeLog c-ppoutput.c
gcc/testsuite : ChangeLog
libcpp : ChangeLog directives.c
libcpp/include : cpplib.h
Added files:
gcc/testsuite/gcc.dg/cpp: cmdlne-dI-C.c cmdlne-dI-C.h
Log message:
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.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10080&r2=2.10081
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-ppoutput.c.diff?cvsroot=gcc&r1=1.25&r2=1.26
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6133&r2=1.6134
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/ChangeLog.diff?cvsroot=gcc&r1=1.77&r2=1.78
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/directives.c.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/include/cpplib.h.diff?cvsroot=gcc&r1=1.14&r2=1.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/cmdlne-dI-C.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/cmdlne-dI-C.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13726