Euphoria Ticket #1017: BITS32 and BITS64 and Arch defines wrong

I had noticed that the translator would try to compile for -m32 when not instructed to do so, on a 64 bit platform. Unit tests showed me the interpreter was acting as if it was being run on a 32-bit platform rather than the 64-bit one I am using.

The language 4.0.5 and 4.1 up to June of 2022 source code relies on ifdefs in order determine which ifdefs to set for every Euphoria program but at no time do these get correct for the current program. The translator respects values if given on the command line but this only effects how it translates the code, and the resulting program still inherits the old arch defines.

I have added a new machine_func of 106, which will use C predefined macros (which are maintained by the GCC and Watcom devs) to determine which architecture is being used. Every program will employ a call to this in every Euphoria program in order to set up the platform defines.

Users will have to upgrade by building with 4.0 rather than an existing 4.1.


Type: Bug Report Severity: Normal Category: Language
Assigned To: SDPringle Status: Fixed Reported Release: 4.05
Fixed in SVN #: View VCS: none Milestone: 4.1.0


Quick Links

User menu

Not signed in.

Misc Menu