frontend

Ziemowit Laski zlaski@apple.com
Tue Jan 7 19:40:00 GMT 2003


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



More information about the Gcc mailing list