This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/140: Re: array initializer problem
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/140: Re: array initializer problem
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sun, 26 Mar 2000 21:11:22 +0200
- References: <000801bf1bb6$693bfc80$0e02a8c0@johngateway>
- Resent-Cc: gcc-prs at gcc dot gnu dot org, john at nanaon-sha dot co dot jp
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
>Number: 140
>Category: c++
>Synopsis: array initializer problem
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sun Mar 26 11:26:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: john@nanaon-sha.co.jp (John Belmonte)
>Release: 2.95.2
>Organization:
NanaOn-Sha Co Ltd
>Environment:
>Description:
Original-Message-ID: <000801bf1bb6$693bfc80$0e02a8c0@johngateway>
Date: Thu, 21 Oct 1999 20:21:24 +0900
In the attached program I would expect the assertion in main() to be valid,
but it fails.
>How-To-Repeat:
#include <assert.h>
struct GOOF {
int a;
};
const GOOF g1[] = {
{ 1 }
};
const GOOF g2[][1] = {
{ g1[0] }
};
int main()
{
assert(g2[0][0].a == g1[0].a);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: