Bug?

Mike Stump mrs@windriver.com
Wed Mar 8 14:28:00 GMT 2000


> Date: Wed, 8 Mar 2000 23:13:47 +0100
> From: Carlo Wood <carlo@alinoe.com>

> Is this a bug?

Nope.

> >g++ -c 20000308.cc
>   int a[4];

> A::A(int const (&b)[4])
>     /* : a(b) */	// (<-- gives same error)
> {
>   a = b;
> }

> so why doesn't  a = b;  ?

It is a leftover from C.  Arrays are not first class types in C.  In
particular, a=b isn't defined on them.  a=a+b isn't defined either.
That's just how it is, and you just have to memorize the exception,
sorry.


More information about the Gcc-bugs mailing list