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


I tried -W, -Wall and -W -Wall and still get no errors or warnings. My
complete command line is:


m68k-elf-gcc -save-temps -W -Wall -c testpp.cpp


My output testpp.s is:


	.file	"testpp.cpp"
	.globl	PartialInitialized
	.data
	.align	2
	.type	PartialInitialized, @object
	.size	PartialInitialized, 12
PartialInitialized:
	.long	0
	.long	1
	.zero	4
	.ident	"GCC: (GNU) 3.3.3"



-----Original Message-----
From: Andrew Pinski [mailto:pinskia@physics.uc.edu] 
Sent: Tuesday, November 30, 2004 4:05 PM
To: Steven L. Zook
Cc: gcc@gcc.gnu.org
Subject: 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]