[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Strange error with 5.4 random generator on old compiler
- From: Mouse <mouse@...>
- Date: Fri, 2 Dec 2022 19:51:50 -0500 (EST)
>> #define LUA_MAXINTEGER 0x7fffffffffffffff
>> #define LUA_MININTEGER (-0x8000000000000000)
>> #define LUA_MAXUNSIGNED 0xffffffffffffffff
> How can that work without ull and ll suffix, it required
> "__extension__ X ## ull" and such macros to get it done with gcc
> 2.95(.2?) for sure. It really does??
Well, I'm not sure. It definitely doesn't work in the preprocessor;
that's where we started. It appears to work otherwise - as in, Lua
builds - though I haven't inspected the (other) uses of those macros to
tell how much, if anything, that means.
I left off the LL/ULL suffixes because of the preprocessor; I did not
expect it to understand them. But it doesn't seem to handle them
without the suffixes either, so I'm not sure. I should perhaps try it
with the suffixes.
> Also the typedef required __extension__ as such .. in 1999?
Which typedef? As in, "typedef long long int foo;" required
__extension__? The compiler I've got doesn't need that, that's about
all I'm certain of. I've tweaked it a little, but I don't _think_ I
did anything that bears on handling of long longs.
> (That the above works for you.. certainly only due to not using -W
> -Wall -pedantic and such.)
Yes, using -ansi -pedantic with that compiler produces warnings about
how "ANSI C does not support long long" or some such. (I can dig up
the exact message if you want.)
I was actually quite delighted - astonished, but delighted - by how
little bludgeoning Lua required to build. I am not used to other
people's software (possibly excepting the trivial 50-line sort)
building on my machines with only minimal tweaks.
I was also delighted - again, astonished but delighted - by how little
of the GNU koolaid Lua has drunk. I was expecting to be faced with
./configure (which, because of the huge pain they are, usually lead to
me tossing the whole thing out as a result). It doesn't even depend on
And, when I was reading the documentation, I was very impressed at how
much mileage Lua gets out of the one data structure it supports. It's
an excellent example of one well-done choice producing a cornucopia of
consequences. The only comparable example I can think of offhand is
what Lisp does with conses.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML firstname.lastname@example.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B