This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug?
- To: carlo at alinoe dot com, gcc-bugs at gcc dot gnu dot org
- Subject: Re: Bug?
- From: Mike Stump <mrs at windriver dot com>
- Date: Wed, 8 Mar 2000 14:28:37 -0800 (PST)
> 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.