This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How can I initialize an array element in G++?
- From: Jason Merrill <jason at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 05 Jul 2002 23:01:52 +0100
- Subject: Re: How can I initialize an array element in G++?
- References: <20020705121328.A13092@lucon.org>
>>>>> "H" == H J Lu <hjl@lucon.org> writes:
> --x.c--
> static const char* foo [4] =
> {
> [2] = "hi",
> };
> --
> I got
> # gcc -c x.c
> # g++ -c x.c
> x.c:3: parse error before `='
> Is there a way to do it in G++?
No, g++ doesn't support that syntax yet.
Jason