tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Why missing #includes don't cause warning/fail?


From: David Mertens
Subject: Re: [Tinycc-devel] Why missing #includes don't cause warning/fail?
Date: Sat, 31 May 2014 16:27:32 -0400

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 <address@hidden> 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
address@hidden
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

reply via email to

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