On Wed, 28 Sep 2005, PerfectDark wrote:

Just try to compile (tcc -c) following file:

//-------------------------------------------
//begin
void foo(SomethingUnknownType* x)
{
}
//end
//-------------------------------------------
[...]

May be all that bugs (see my next ask in list) because I use non-patched tcc 
(tcc-0.9.23), or windows version has something bug...

Even though I could compile tcc by tcc and simple windows applications (GDI and 
console). Tcc crushes if it meet that code (see my question).

If you know how I can fix it, tell me please.


This seems to be a bug in tcc itself, not the Windows port. I ran it on a
Linux system and got the following:

$ gdb tcc-0.9.23/tcc
GNU gdb 6.3
[...]
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run -c foo.c
Starting program: /home/svolli/tcc/tcc-0.9.23/tcc -c foo.c

Program received signal SIGSEGV, Segmentation fault.
0x0804bc2f in sym_push (v=42, type=0x80804ac, r=498, c=12) at tcc.c:1766
1766            s->prev_tok = *ps;
(gdb) quit
The program is running.  Exit anyway? (y or n) y
$ cat foo.c
void foo(unknown *x)
{
}

I'd say that ps is NULL in this case, but that's a rough guess.
Hope this helps.

Greetings from Germany,
SvOlli
--
|  _______       |
| (  /\          | There's no feeling any greater
|__)v\/lli a.k.a.| Than to shoot first and ask questions later
|Sven Oliver Moll|   -- "Weird Al" Yankovic, "Trigger Happy"


_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to