https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124148
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Yiwei Zhang from comment #5) > wow...does that suggest the entire Vulkan way of handling pNext struct > chaining is a violation of such? Correct, accessing via VkBaseInStructure without VkBaseInStructure being the first field of the structs is violation of C/C++ aliasing rules. > > e.g. the VkBufferCreateInfo structure with VkExternalMemoryBufferCreateInfo > chained in its pNext: > - > https://docs.vulkan.org/refpages/latest/refpages/source/VkBufferCreateInfo. > html > - > https://docs.vulkan.org/refpages/latest/refpages/source/ > VkExternalMemoryBufferCreateInfo.html > > The pNext walker normally uses this VkBaseInStructure to loop through the > chained structs: > - > https://docs.vulkan.org/refpages/latest/refpages/source/VkBaseInStructure. > html
