This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: frontend
- From: Ziemowit Laski <zlaski at apple dot com>
- To: godfryd at zamek dot gda dot pl
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 7 Jan 2003 11:23:51 -0800
- Subject: Re: frontend
On Tuesday, Jan 7, 2003, at 01:45 US/Pacific, Michal Nowikowski wrote:
Hello
I'm writing a frontend for some small language. I've got few problems.
First: how to build a function with 'char *' parameter - in examples
(toy,
spl, flim, treelang languages) I have analysed there are only simple
function with integers as arguments.
Second: how to build a call to function from library e.g. printf. I'd
like
to add to generated code some calls to functions defined in some
library.
Example in my language, there is instruction:
print "blah";
so how to call print function from stdio.h.
Michal,
Take a look at the Objective-C front-end, specifically
gcc/objc/objc-act.c.
In it you'll see prototypes for many functions being defined
(objc_msgSend, etc.)
and then the functions getting called (via build_function_call()).
Pozdrowienia,
--Ziemek
--------------------------------------------------------------
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477