Re: [Tinycc-devel] static const not recognized as const value?

2010-12-27 Thread Stephan Beal
On Mon, Dec 27, 2010 at 6:03 PM, Aharon Robbins wrote: > The answer is that this feature is not in C. It is in C++, which > may be why you think it ought to work. :-) > Aha, so all this time i've been using a gcc extension without knowing it. Bummer :(. Thanks for the tip, though. -- - s

Re: [Tinycc-devel] static const not recognized as const value?

2010-12-27 Thread Aharon Robbins
ough. HTH, Arnold > Date: Mon, 27 Dec 2010 14:50:06 +0100 > From: Stephan Beal > To: tinycc-devel@nongnu.org > Subject: [Tinycc-devel] static const not recognized as const value? > > Hi, TCCers! > > (This is my first post to the list.) > > Every now and then i write c

[Tinycc-devel] static const not recognized as const value?

2010-12-27 Thread Stephan Beal
Hi, TCCers! (This is my first post to the list.) Every now and then i write code like the following: static const size_t sz = 1024 * 2; char buffer[sz]; ... tcc complains that sz is not a constant expression, which "just doesn't seem right" to me. It does of course accept: enum { sz = 1024 * 2