Patch to improve cpplib's C++ support
Zack Weinberg
zack@rabi.columbia.edu
Sat Jul 31 22:30:00 GMT 1999
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
More information about the Gcc-patches
mailing list