On 09/27/2017 11:53 AM, Nicolai Hähnle wrote: > On 27.09.2017 20:42, Nicholas Miell wrote: >> Giving the same name to two different types violates the C++ One >> Definition >> Rule and gcc will complain about it in LTO builds. > > Oh my. What does the gcc warning look like? (I assume it's just a warning.) >
[5/5] Linking target src/amd/vulkan/libvulkan_radeon.so. ../src/amd/addrlib/inc/chip/gfx9/gfx9_gb_reg.h:39:7: warning: type ‘union GB_ADDR_CONFIG’ violates the C++ One Definition Rule [-Wodr] union GB_ADDR_CONFIG { ^ ../src/amd/addrlib/inc/chip/r800/si_gb_reg.h:92:3: note: a different type is defined in another translation unit } GB_ADDR_CONFIG; ^ ../src/amd/addrlib/inc/chip/gfx9/gfx9_gb_reg.h:74:7: note: the first difference of corresponding definitions is field ‘bitfields’ } bitfields, bits; ^ ../src/amd/addrlib/inc/chip/r800/si_gb_reg.h:90:25: note: a field with different name is defined in another translation unit unsigned int val : 32; > Since these are auto-generated headers which are very much standardized > inside AMD, I'm hesitant to apply this particular patch. Certainly there > can't be a bug here in reality, since those are just dumb unions. > > I think internally we'd rather want a namespace-based solution. Any > ideas? I need to reflect on this a bit... > > Thanks, > Nicolai _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev