public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* frontend
@ 2003-01-07 10:13 Michal Nowikowski
  2003-01-07 19:40 ` frontend Ziemowit Laski
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Nowikowski @ 2003-01-07 10:13 UTC (permalink / raw)
  To: gcc

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.

Best regards
Godfryd


-- 
|  Michal Nowikowski <godfryd@zamek.gda.pl>
|  BOFH excuse #47: Complete Transient Lockout

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: frontend
  2003-01-07 10:13 frontend Michal Nowikowski
@ 2003-01-07 19:40 ` Ziemowit Laski
  0 siblings, 0 replies; 2+ messages in thread
From: Ziemowit Laski @ 2003-01-07 19:40 UTC (permalink / raw)
  To: godfryd; +Cc: gcc


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-07 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-07 10:13 frontend Michal Nowikowski
2003-01-07 19:40 ` frontend Ziemowit Laski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).