This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: a treelang question about printf.
- From: "Der-Johng Sun" <derjohng at ms94 dot url dot com dot tw>
- To: "'James A. Morrison'" <ja2morri at csclub dot uwaterloo dot ca>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 18 Jan 2005 11:35:06 +0800
- Subject: RE: a treelang question about printf.
Because I define a "write" token in lex, and I want it behave like printf.
Best regards,
Der-Johng Sun
> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On
> Behalf Of James A. Morrison
> Sent: Monday, January 17, 2005 10:31 PM
> To: Der-Johng Sun
> Cc: gcc@gcc.gnu.org
> Subject: Re: a treelang question about printf.
>
>
>
> "Der-Johng Sun" <derjohng@hyweb.com.tw> writes:
>
> > Hi,
> >
> > I try to implement a litter front end with the gcc. But I
> am confused,
> > about the printf(). How to implement the code?
> >
> > test()
> > {
> > write("Hello World!!\n"); -- I want to call printf.
> > }
> >
> > I had found the informations such as BUILT_IN_PRINTF,
> > expand_builtin_fprintf etc... But I still don't known how
> to implement
> > it.
>
> Why not just build a CALL_EXPR to printf instead of a
> CALL_EXPR to write ?
>
> > I'm novice. I'm sorry if it is a stupid question.
> >