This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ frontend bug involving pointers to arrays
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gcc at gcc dot gnu dot org, jason at gcc dot gnu dot org
- Date: 17 Jul 2003 15:12:34 -0700
- Subject: Re: C++ frontend bug involving pointers to arrays
- Organization: CodeSourcery, LLC
- References: <200307171457.QAA19034@faui11.informatik.uni-erlangen.de>
On Thu, 2003-07-17 at 07:57, Ulrich Weigand wrote:
> Hello,
>
> there appears to be a bug in the handling of pointers to arrays of
> unspecified length as struct members in the C++ frontend.
>
> The following testcase fails to compile with the error:
> error: cannot convert `int (*)[0]' to `int (*)[]' in assignment
> which appears to indicate that the type of the member 'a'
> of 'struct test' was incorrectly determined.
I think Jason wrote that code, so I've copied him. It should clearly
apply only if the member itself is an array.
As for why this is enabled by default, I have no idea. I agree that it
should probably only be enabled with a -fms-extensions flag.
--
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC