This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
C-compatible.

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]