[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] snprintf problem with -b
From: |
Nigel Horne |
Subject: |
[Tinycc-devel] snprintf problem with -b |
Date: |
Sat, 6 Nov 2004 11:04:17 +0000 |
User-agent: |
KMail/1.6.2 |
Tbis program core dumps if compiled with the -b option. It should
work. Does it work in 0.9.21?
#include <stdio.h>
int main(void)
{
char b[5];
snprintf(b,5,"123456789");
return(b[4]!='\0');
}
address@hidden tmp]$ tcc -b -Wall fff.c
address@hidden tmp]$ ./a.out
Segmentation fault
address@hidden tmp]$ tcc -Wall fff.c
address@hidden tmp]$ ./a.out
address@hidden tmp]$ echo $?
0
address@hidden tmp]$ tcc -v
tcc version 0.9.20
-Nigel
--
Nigel Horne. Arranger, Composer, Typesetter.
NJH Music, Barnsley, UK. ICQ#20252325
address@hidden http://www.bandsman.co.uk