lua-users home
lua-l archive

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

> > The
> > main issues are implicit type casting between double and float and long
> > ints.  For example, on platforms like the PS2 you have to be really
> > that you don't accidentally enable emulated doubles.  Also, we have
> > denormal trouble on the PC when using Lua and DirectX together.  Each
> > a new Lua is released we spend at least a full day fixing all the
> But aren't you *allowed* to implicitly cast between double and float and
> and int? Unfortunately I don't have my copy of the C standard here, but
> reasonably sure that's all legal. Not meaning to quibble, but it sounds as
> 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

I didn't say it was illegal, that's why it's a warning and not an error.  If
I put the contents of a long into a char without casting, a warning is
justified. Some compilers won't warn you about this by default, others (such
as CodeWarrior) are very fussy about any kind of implicit castand require
you to disable the warnings in their preferences dialog. The original poster
mentioned five platforms and I think it's quite surprising that there were
no warnings, and although Lua may run, it may not do so as good as it could,
or should.