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 mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel