public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: LIU Hao <lh_mouse@126.com>
To: Achim Gratz <Stromeko@nexgo.de>, gcc@gcc.gnu.org
Subject: Re: gcc-12.3 cannot build gcc-ada on Cygwin
Date: Mon, 22 May 2023 02:12:53 +0800	[thread overview]
Message-ID: <c5b52298-d63f-da5a-beb2-758f685444ea@126.com> (raw)
In-Reply-To: <87wn11iqwf.fsf@Rainer.invalid>


[-- Attachment #1.1: Type: text/plain, Size: 993 bytes --]

在 2023-05-22 00:35, Achim Gratz 写道:
> The error probably is in part a result of using g++ for the compilation,
> but other than that I don't really have an idea what goes on here or how
> to fix it.

This looks like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108300.

It's because GCC defines `abort` as a macro; and the Windows header 'msxml.h', which is included 
indirectly by 'accctrl.h' (within Ada and GCC JIT), has a member function with that same name.

Previously, mingw-w64 had a distinct 'msxml.h' which did `push_macro` and `pop_macro`, but it's now 
imported from wine for additional functionality, while the wine header does not have those pragmas 
and is causing trouble. GCC should not have defined macros which match standard functions like that 
(see Comment 9 on the PR above). Sadly nobody has refactored it so far.

A temporary fix for this issue is to add `-DCOM_NO_WINDOWS_H` in `CPPFLAGS` when building GCC.



-- 
Best regards,
LIU Hao


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2023-05-21 18:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-21 16:35 Achim Gratz
2023-05-21 18:12 ` LIU Hao [this message]
2023-05-22 20:08   ` Achim Gratz
2023-05-24  1:42     ` LIU Hao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5b52298-d63f-da5a-beb2-758f685444ea@126.com \
    --to=lh_mouse@126.com \
    --cc=Stromeko@nexgo.de \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).