This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ frontend bug involving pointers to arrays


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]