I have encountered this behavior before as well. I am pretty sure that the
compiler is making a guess as to the form of the function based on how it's
called. Then, it links to libc by default, so it is able to link against
those functions without trouble. If you enable certain warnings (not sure
which ones off the top of my head), tcc will complain about this behavior.

David


On Sat, May 31, 2014 at 3:16 PM, Wendell P <wende...@operamail.com> wrote:

> Using tcc 0.9.26 on Windows 7 64-bit.
> In the fib.c example that comes with tcc, atoi() is used but
> there is no #include <stdlib.h>, yet tcc compiles it OK. It
> even compiles without problem if I remove #include <stdio.h>.
>
> --
> http://www.fastmail.fm - The way an email service should be
>
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>



-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to