From: Jason M. <ko...@gm...> - 2008-08-24 03:22:18
|
Henri Häkkinen wrote: > Indeed. At the moment, I don't have an access to a Windows box, but > could somebody who has, kindly test out the possibility of this. > > Does the MSVC produce warnings, when you try to compile something like > this: > > typedef struct FOO_s { > union { > struct { > int di; > }; > in do; > }; > } FOO; > > int main() > { > FOO f; > f.di = 1; > f.do = 2; > return 0; > } No, but I can't imagine GCC does. That's because "do" is a C keyword ;) When you change it to be a regular identifier, it compiles fine. I even switched the order of the struct and the int, and it still works. |