September 21, 2004
why is it necessary that a local

   char buf[20]="Hello";

compiles ok, but returns a runtime error:

   Error: lengths don't match for array copy

Global and static initializations work as expected.

-- 
Helmut Leitner    leitner@hls.via.at
Graz, Austria   www.hls-software.com
September 21, 2004
Helmut Leitner wrote:
> why is it necessary that a local
> 
>    char buf[20]="Hello";
> 
> compiles ok, but returns a runtime error:
> 
>    Error: lengths don't match for array copy
> 
> Global and static initializations work as expected.

Hmm.  Something that fundamental should not be allowed
to compile.