- tests2/113_btdll.c: test handling multiple stabs infos
Also:
- libtcc.c: remove _ISOC99_SOURCE pre-defines. It is causing
strange warnings such as 'strdup not declared'
- i386/x86_64-gen.c cleanup bounds_pro/epilog. This discards
the extra code for main's argv. If needed, __argv might be
processed instead.
- tccgen.c:block(): reduce stackspace usage. For example with
code like "if (..) ... else if (..) ... else if (..)... "
considerable numbers of nested block() calls may occur.
Before that most stack space used when compiling itself was
for libtcc.c:tcc_set_linker().
Now it's rather this construct at tccpp.c:2765: in next_nomacro1():
if (!((isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
|| c == '.'
|| ((c == '+' || c == '-')
...
43 lines
480 B
C
43 lines
480 B
C
int tcc_backtrace(const char*, ...);
|
|
#define hello() \
|
|
tcc_backtrace("hello from %s() / %s:%d",__FUNCTION__,__FILE__,__LINE__)
|
|
|
|
#ifndef _WIN32
|
|
# define __declspec(n)
|
|
#endif
|
|
|
|
#if DLL==1
|
|
__declspec(dllexport) int f_1()
|
|
{
|
|
hello();
|
|
return 0;
|
|
}
|
|
|
|
|
|
#elif DLL==2
|
|
__declspec(dllexport) int f_2()
|
|
{
|
|
hello();
|
|
return 0;
|
|
}
|
|
|
|
|
|
#else
|
|
|
|
int f_1();
|
|
int f_2();
|
|
int f_main()
|
|
{
|
|
hello();
|
|
return 0;
|
|
}
|
|
|
|
int main ()
|
|
{
|
|
f_1();
|
|
f_2();
|
|
f_main();
|
|
return 0;
|
|
}
|
|
|
|
#endif
|