[Nasm-bugs] [Bug 3392383] building with watcom is broken

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Wed Mar 1 00:40:11 PST 2017


https://bugzilla.nasm.us/show_bug.cgi?id=3392383

--- Comment #11 from sezeroz at gmail.com ---
(In reply to H. Peter Anvin from comment #10)
> It is a matter, based on experience, that that will simply break over and
> over and over and it will be incredibly frustrating to maintain.  If this
> hack can be made to work it is "out of sight"; otherwise I'm honestly not
> keen on spending the effort on this.

OK then.

> A few more things which may be worth trying:
> 
> static inline unsigned int watcom_switch_hack(uint64_t x)
> {
> #pragma disable_message (124);
>     if (x > (uint64_t)UINT_MAX)
>         return BOGUS_CASE;
>     else
>         return (unsigned int)x;
> # pragma enable_message (124);
> }

Simply adding the (uint64_t) cast works. Please add the same cast
in output/outobj.c line 1143, i.e.
       if (size > (uint64_t)UINT_MAX)

With these two changes nasm compiles for me with bot ow1.9 and
also with the unofficial ow2.0, and the generated exe compiles
my asm files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list