This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/1765: bogus warning with new pod struct ()
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/1765: bogus warning with new pod struct ()
- From: nathan at codesourcery dot com
- Date: 25 Jan 2001 09:32:13 -0000
- Reply-To: nathan at codesourcery dot com
>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==