[Bug preprocessor/13726] [3.3/3.4/4.0 regression]cpp -C -dI loses comments on same line as #include directives

echristo at redhat dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 1 02:21:00 GMT 2005


------- Additional Comments From echristo at redhat dot com  2005-02-01 02:21 -------
The best I can get without major surgery to cpp is this:

#include "test.h"
<contents of test.h>
                   /* comment from include line  */

Which is likely insufficient for any good needs. I think what we need to be able
to do with cpplib is to put actions on a stack and have them popped at the end
of the directive.

Another option is to have _cpp_push_include (or push_file) finish out the
current buffer before actually pushing out the file. I don't know how well this
will work out in practice though.

Thoughts?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zack at codesourcery dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13726



More information about the Gcc-bugs mailing list