https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103635

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED
     Ever confirmed|1                           |0
           Keywords|                            |rejects-valid, wrong-code

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Mark Harmstone from comment #10)
> So the underlying issue is that _WIN64 is not getting set with -mabi=sysv.
> Is this a bug with GCC, or in the mingw headers?

The mingw headers assume if _WIN64 is not defined then it is mingw32 ABI.

But GCC has:
      builtin_define ("__MSVCRT__");                            \
      builtin_define ("__MINGW32__");                           \
      builtin_define ("_WIN32");                                \
      builtin_define_std ("WIN32");                             \
      builtin_define_std ("WINNT");                             \
      builtin_define_with_int_value ("_INTEGRAL_MAX_BITS",      \
                                     TYPE_PRECISION (intmax_type_node));\
      if (TARGET_64BIT && ix86_abi == MS_ABI)                   \
        {                                                       \
          builtin_define ("__MINGW64__");                       \
          builtin_define_std ("WIN64");                         \
          builtin_define ("_WIN64");                            \
        }                                                       \


At this point, it is up to the mingw maintainers to figure out if the bug is in
GCC or mingw headers because I have no opinion on this really.

Reply via email to