This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to improve cpplib's C++ support


On 20 Jul 1999 03:06:25 -0700, Jason Merrill wrote:
>Here's a revised patch.  Can I put this in?
>
>Tue Jul 20 02:52:01 1999  Jason Merrill  <jason@yorick.cygnus.com>
>
>	* toplev.c (documented_lang_options): Add -fpreprocessed.
>	* cpplib.h (struct cpp_buffer): Add preprocessed.
>	* cppinit.c (cpp_handle_option): Handle -fpreprocessed.
>	(cpp_start_read): Don't expand macros or emit an initial #line
>	directive if -fpreprocessed.

You need to disable directive handling too.  Consider

#define EMPTY  /* nothing */
EMPTY # include "foo.h"

C89 says the include is not processed.  But if we generate an .i file and
run it through again, with your patch it will be.

Otherwise, I like it.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]