tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] A difference between TCC and GCC. Who is right ?


From: Bin Shi
Subject: [Tinycc-devel] A difference between TCC and GCC. Who is right ?
Date: Fri, 10 Dec 2010 17:38:42 +0800

The follow C code:
 
  #include <stdio.h>
  
  int global_a = 10;
  
  int increase(void)
  {
       return global_a += 10;
  }

 int main(void)
 {
      printf("%d,%d\n", increase(), global_a);
 }
 
GCC output:
20, 10
 
but tcc-0.9.25 output:
20, 20
 
Who is right ? What does ANSI C defines?
 
 
 

reply via email to

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