[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Heap usage and variable argument C functions
- From: David Given <dg@...>
- Date: Tue, 21 Dec 2004 11:13:46 +0000
On Tuesday 21 December 2004 04:39, Brett Bibby wrote:
> Um, I won't argue that Lua is great because it is, but it doesn't compile
> on any platform I know of without numerous warnings if you actually set the
> compiler to verbose. I would strongly suggest that you look at those
> warnings across your platforms at least once before disabling them.
We compile Lua on our platform with -Wall and don't get any warnings. It's a
gcc-based compiler with 16-bit short, 32-bit int, 64-bit long and IEEE
doubles, so it's a pretty vanilla setup.
> main issues are implicit type casting between double and float and long and
> ints. For example, on platforms like the PS2 you have to be really careful
> that you don't accidentally enable emulated doubles. Also, we have
> denormal trouble on the PC when using Lua and DirectX together. Each time
> a new Lua is released we spend at least a full day fixing all the warnings.
But aren't you *allowed* to implicitly cast between double and float and long
and int? Unfortunately I don't have my copy of the C standard here, but I'm
reasonably sure that's all legal. Not meaning to quibble, but it sounds as if
your warnings are platform-specific, due to one of the C standard's
assumptions not being entirely true on your platform... can you quote a few?
+- David Given --McQ-+ "The cup of Ireland's misfortunes has been
| email@example.com | overflowing for centuries, and it is not full yet."
| (firstname.lastname@example.org) | --- Sir Boyle Roche
+- www.cowlark.com --+