Just for fun, i kicked the warning level up from 4 to all on the caveman project. it did catch a few explicit conversions i missed.
after suppressing the "#ifdef symbol is undefined" and "padding data structure" warnings in the windows and directx headers, and the "inlining" and "not inlining" warnings from the linker, i set linker output to verbose. then i tried all the different verbose setttings. when i tried - show comdat folding, this is what i got:
so this means that, for example, remove_stuff_near_rockshelter and remove_stuff_near_cave are identical at the object code and/or machine code level?
i understand the concept of how this could be, just want to confirm i'm reading this output correctly.
means that internally the compiler is creating code that returns a pointer to a struct, and is using the same code for all? (all the symbols listed in this case are POD structs).
is it folding them because the structs just happen to be the same size, perhaps?