* struct vs. class in GCC source
@ 2023-01-10 14:50 Paul Koning
2023-01-10 19:29 ` Jason Merrill
0 siblings, 1 reply; 2+ messages in thread
From: Paul Koning @ 2023-01-10 14:50 UTC (permalink / raw)
To: GCC Development
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".)
paul
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: struct vs. class in GCC source
2023-01-10 14:50 struct vs. class in GCC source Paul Koning
@ 2023-01-10 19:29 ` Jason Merrill
0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2023-01-10 19:29 UTC (permalink / raw)
To: Paul Koning; +Cc: GCC Development
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-10 19:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 14:50 struct vs. class in GCC source Paul Koning
2023-01-10 19:29 ` Jason Merrill
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).