Simon Lehmayr wrote:
Hi,
I found an error in tcc while compiling a project which uses one header
that includes another header several times using defines to generate
different code.
Caching of headers hides the following includes thus no code is generated
in these cases.
I disabled caching by returning NULL in the cache check.
Caching should include the environmental state (defines, etc) to avoid
this problem.
There is some state included, that is headers are skipped only if there is
an #ifndef macro around, such as:
#ifndef FOO_H
#define FOO_H
...
#endif
And the ifdef must be the first thing and the endif must be the last.
I'm not sure how this can not work but maybe you can tell more details.
Also you could compile TCC with INC_DEBUG (at tcc.h:79).
Greetings,
Simon
_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel