tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] function body related bug


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] function body related bug
Date: Mon, 16 Sep 2013 14:56:10 +0200
User-agent: KMail/4.10.5 (Linux/3.10-1-amd64; KDE/4.10.5; x86_64; ; )

Le dimanche 7 juillet 2013 23:40:48 Abdul Wadud Mohammad Mohibur Rashid a 
écrit :
> Hi,
> Here is the example code that was not suppose to compile because of having
> two body of function test which return pointer of integer. But it compile
> fine in tiny c #include <stdlib.h>
> int (*test())
> {
> int *x=malloc(sizeof(int));
> *x=10;
> return x;
> }
> 
> int *test()
> {
>  int *y=malloc(sizeof(int));
> *y=11;
> return y;
> }
> 
> int main()
> {
>  int z=*test();
>  return 0;
> }
> This code fails both in gcc and visual studio. 
>  I am using version: 0.9.25 

I've just pushed a patch to the mob branch to fix this issue. Thanks for the 
bug report !

> 
> Sincerely,
> Abdul Wadud Mohammad Mohibur Rashid,
> email: address@hidden
> Mobile Ph. no. 08030040355

Best regards,

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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