[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] How TCC handlse the scope

From: Rob Landley
Subject: Re: [Tinycc-devel] How TCC handlse the scope
Date: Fri, 22 Jun 2007 17:19:01 -0400
User-agent: KMail/1.9.6

On Friday 22 June 2007 14:51:49 Anton wrote:
> Hi again,
>    This time a have been amazed at the strange  behaviour  of
>    TCC regarding the scope.

Actually, this is fairly straightforward C.  If you use a function that there 
hasn't been a prototype for yet, you get the default prototype for that 

>    Listing of b.c -------------------------------------------
>      int print(int c) {
>         printf("Print: %i", c); // it should not be visible!
>      }
>    ----------------------------------------------------------

No, in the absence of a prototype, C will assume that the return type is "int" 
and the arguments are "...".

This isn't the compiler, this is the language.

"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]