c++/1765: bogus warning with new pod struct ()

nathan@codesourcery.com nathan@codesourcery.com
Thu Jan 25 01:36:00 GMT 2001


>Number:         1765
>Category:       c++
>Synopsis:       bogus warning with new pod struct ()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 25 01:36:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Nathan
>Release:        CVS 20010124
>Organization:
>Environment:

>Description:
The attached program, compiled with -W gives
nathan@uha:15>./g++ -B ./ -c -W incomming/init.C 
incomming/init.C: In function `X* foo()':
incomming/init.C:9: warning: missing initializer for member `X::i'

which is wrong - it appears the missing initialzer code
for brace initializer lists is being activated - boo!

I'd prefer the fix where the missing-initializer warning
went away if the last present initializer was zero -
I think that might fix this one too.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="init.C"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="init.C"

Ly8gLVcgCnN0cnVjdCBYCnsKICBpbnQgaTsKfTsKClggKmZvbyAoKQp7CiAgcmV0dXJuIG5ldyBY
ICgpOyAgLy8gV0FSTklORyAtIGdldHMgYm9ndXMgd2FybmluZwp9Cg==


More information about the Gcc-bugs mailing list