[Top][All Lists]

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

[Tinycc-devel] function body related bug

From: Abdul Wadud Mohammad Mohibur Rashid
Subject: [Tinycc-devel] function body related bug
Date: Sun, 7 Jul 2013 23:40:48 -0700 (PDT)

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));
return x;

int *test()
  int *y=malloc(sizeof(int));
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 

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

reply via email to

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