struct vs. class in GCC source

Paul Koning paulkoning@comcast.net
Tue Jan 10 14:50:24 GMT 2023


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



More information about the Gcc mailing list