This is the mail archive of the
mailing list for the GCC project.
Re: A FrontEnd in C++?
- From: dewar at gnat dot com (Robert Dewar)
- To: fjh at cs dot mu dot OZ dot AU, zack at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 22 Aug 2002 04:54:09 -0400 (EDT)
- Subject: Re: A FrontEnd in C++?
> historically, very little effort has been put into
> maintaining that compatibility (beyond what is needed to interface the
> language runtime to the system), so it is not a thing to be relied on.
While this statement is absolutely true about C, which has never had any
facilities for interfacing with other languages, it takes only one to tango
here, and other languages *do* concern themselves with multi-language
programming. For example in Ada a required feature is
pragma Import (C, name-of-function-in-Ada, name-of-function-in-C);
and the compiler is *required* to make sure that the calling sequence is
Actually in the case of GNAT, we don't even need to use pragma Import, since
the default calling convention is precisely compatible with C anyway.