tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] macro substitution bug


From: Feng Nauh
Subject: [Tinycc-devel] macro substitution bug
Date: Tue, 29 Apr 2008 22:49:42 +0800

see: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm
 
macro.c:
 
#define x 3
#define f(a) f(x * (a))
#undef x
#define x 2
#define g f
#define z z[0]
#define h g(~
#define m(a) a(w)
#define w 0,1
#define t(a) a
f(y+1) + f(f(z)) % t(t(g)(0) + t)(1);
g(x+(3,4)-w) | h 5) & m
      (f)^m(m);
 
results in:
f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
 
but TCC -E  hangs and result as:
f ( 2 * ( y + 1 ) ) + f ( 2 * ( f ( 2 * ( z [ 0 ] [ 0 ] [ 0 ] ) ) ) ) % f ( 2 *
( 0 ) ) + t ( 1 ) ;
f ( 2 * ( 2 + ( 3 , 4 ) - 0 , 1 ) ) | macro.c:12: memory full
 
PS: address@hidden post a macro substitution bug on 12/18/07, it do not fix yet; there is a patch in Rob's mail-list. 

reply via email to

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