This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug? cannot copy const array
- To: jdonner <jdonner at schedsys dot com>
- Subject: Re: bug? cannot copy const array
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Fri, 2 Feb 2001 19:41:04 +0000
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <3A7B00D3.3070100@schedsys.com>
jdonner wrote:-
> It complains:
>
> bug.cpp:10: incompatible types in assignment of `const int[3]' to `int[3]'
>
> Surely this is a bug, since you can copy a const int to an int, no?
I don't believe you can assign one array of anything to another. You
need to use memcpy.
Neil.