Changes between Initial Version and Version 1 of Ticket #1867, comment 1


Ignore:
Timestamp:
03/16/26 15:38:59 (3 weeks ago)
Author:
sjamaan

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1867, comment 1

    initial v1  
    77Now that I'm thinking of this, we could make this more flexible:
    88
    9 One alternative would be to trigger a runtime error when the read-back literal doesn't fit in a fixnum, essentially making the code 64-bit only. Another would be to emit code that errors out the C compiler.
     9One alternative would be to trigger a **runtime** error when the read-back literal doesn't fit in a fixnum, essentially making the code 64-bit only.
    1010
    11 And if we don't do that, perhaps we can at least improve the error message (which is a holdover from the early days before the full numeric tower was integrated, when we had only fixnums and flonums)
     11Another would be to emit code that causes a **compile-time error, but in the C compiler** when compiling for a 32-bit target. Something like this:
     12
     13{{{
     14#ifndef C_SIXTY_FOUR
     15#error "This code can only be compiled on 64-bit platforms because there are large fixnum literals and CHICKEN was running in fixnum mode when this was translated to C"
     16#endif
     17}}}
     18
     19And if we don't go for either of those, perhaps we can at least improve the error message (which is a holdover from the early days before the full numeric tower was integrated, when we had only fixnums and flonums)