This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ANSIfy cp/parser.c
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Devang Patel <dpatel at apple dot com>
- Cc: Per Bothner <per at bothner dot com>, Neil Booth <neil at daikokuya dot co dot uk>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 10 Jan 2003 19:36:36 +0000 (GMT)
- Subject: Re: ANSIfy cp/parser.c
On Fri, 10 Jan 2003, Devang Patel wrote:
> Not necessarily. If it is done right way then there will not be
> separate data
> structures for each language affecting PCH as far as the prefix header
> does not contain language dependent constructs. I am not saying it is
> straightforward or easy.But If preprocessed output of header is
> identical
> for each language than one PCH should work in unified front end.
Preprocessed output is highly unlikely to be the same in useful cases for
C and C++, since the standard C headers use extern "C", put things in
namespace "std", etc. in C++ (and have other requirements in C++ different
from the requirements in C). Things might be more similar in some cases
between C and ObjC (are there any programs that are valid C and ObjC but
have different meanings in the two languages?) but you'd need some way for
PCH generation to tell "has flag_objc ever been tested in this
compilation?" to know whether the PCH file can be shared. I believe the
present approach is that a PCH file is specific to a precise combination
of compiler flags.
--
Joseph S. Myers
jsm28@cam.ac.uk