This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A FrontEnd in C++?
- From: Matt Austern <austern at apple dot com>
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Cc: khalid aggag <khalidaggag at hotmail dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 19 Aug 2002 10:51:40 -0700
- Subject: Re: A FrontEnd in C++?
On Monday, August 19, 2002, at 12:46 AM, Fergus Henderson wrote:
Use `extern "C"', either in the C++ code, e.g.
extern "C" {
#include "tree.h"
}
or by modifying the GCC headers, e.g.
/* tree.h */
#ifdef __cplusplus
extern "C" {
#endif
... body of tree.h goes here
#ifdef __cplusplus
}
#endif
The latter is probably a good idea regardless: it's nice to be able to
include tree.h in projects that aren't strictly part of the compiler,
and
some of those projects are written in C++.
(When I was at SGI, for example, and we were working on a
tree-to-WHIRL translator, I wrote a tree consistency checker in
C++.)
--Matt