tinycc-devel
[Top][All Lists]
Advanced

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

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


From: Tenma Chow
Subject: Re: [Tinycc-devel] A difference between TCC and GCC. Who is right ?
Date: Fri, 10 Dec 2010 17:46:57 +0800

表达式参数求值是没有规定的。

2010/12/10 Bin Shi <address@hidden>
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?
 
 
 

_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel



reply via email to

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