This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to improve cpplib's C++ support
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: Patch to improve cpplib's C++ support
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Tue, 20 Jul 1999 13:06:36 -0400
- cc: egcs-patches at egcs dot cygnus dot com
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