This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Partial aggregate initialization warning proposal



On Nov 30, 2004, at 6:59 PM, Steven L. Zook wrote:


Using GCC 3.3.3 (and presumably later revisions), I compile following
test C++ program fragment (the definition is at global scope):

int PartialInitialized[ 3 ] = { 0, 1 };

I get no warnings or errors. GCC is behaving correctly since
(INCITS+ISO+IEC+14882-2003) 8.5.1-7 calls out for value-initialization
for the non-explicitly initialized members.


Yes try with "-W -Wall", you will get a warning.

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]