Hi, On Fri, 29 Jan 2010 11:59:02 -0800, Basabi Bhattacharya <bbhattacharya at pillardata.com> wrote: > I'm trying to compile our code using SunStudio12 compiler and getting > error " zero-sized struct/union". The 'gcc' does not complain about this. I > read in some compiler discussion group that SunStudio12 supports this > extention. Is it true and is there a flag I could use to supress this? > > > Thanks, > Basabi
It's best not to depend on this behaviour since zero-size structs and unions violate the C and C++ standards. C99 allows "flexible" arrays (blah[]) but they can't be the only member of a struct. -Albert
