[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
function.
> 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.
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
- [Tinycc-devel] How TCC handlse the scope, Anton, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope,
Rob Landley <=
- Re: [Tinycc-devel] How TCC handlse the scope, Anton, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Bernhard Fischer, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Anton, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, David A. Wheeler, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Anton, 2007/06/22
- Re: [Tinycc-devel] How TCC handlse the scope, Rob Landley, 2007/06/23
- Re: [Tinycc-devel] How TCC handlse the scope, Dave Dodge, 2007/06/25