public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Paul Koning <paulkoning@comcast.net>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: struct vs. class in GCC source
Date: Tue, 10 Jan 2023 14:29:17 -0500	[thread overview]
Message-ID: <CADzB+2mjtW8Z9M-0wVCfygGtMaDJvYWBVFR2NtNd=WYJVy5Rmw@mail.gmail.com> (raw)
In-Reply-To: <E6DD6543-1FC6-48B3-A70B-CDDB96EFAB2F@comcast.net>

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

On Tue, Jan 10, 2023 at 9:51 AM Paul Koning via Gcc <gcc@gcc.gnu.org> wrote:

> Building on Mac with Clang I get warnings like this:
>
> ../../../gcc/gcc/cgraph.h:2629:28: warning: struct 'cgraph_edge' was
> previously declared as a class; this is valid, but may result in linker
> errors under the Microsoft C++ ABI [-Wmismatched-tags]
>
> It seems to be talking about a MS bug (since C++ says struct and class
> mean the same thing other than the default access).  Still, I wonder if it
> would be worth changing the code to use just one of "struct" or "class" for
> any given type.  (And then the convention would presumably be that a POD
> type is called "struct" and other types are "class".)
>

Yes, it might be worth adding -Wmismatched-tags to STRICT_WARN.  Is
bootstrapping with VC++ is supported?

Jason

      reply	other threads:[~2023-01-10 19:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 14:50 Paul Koning
2023-01-10 19:29 ` Jason Merrill [this message]

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='CADzB+2mjtW8Z9M-0wVCfygGtMaDJvYWBVFR2NtNd=WYJVy5Rmw@mail.gmail.com' \
    --to=jason@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=paulkoning@comcast.net \
    /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).