C++ PATCH: PR 28018
Mark Mitchell
mark@codesourcery.com
Wed Jun 14 19:51:00 GMT 2006
Gabriel Dos Reis wrote:
> Mark Mitchell <mark@codesourcery.com> writes:
>
> [...]
>
> | - pedwarn ("ISO C++ forbids assignment of arrays");
> | + {
> | + error ("array used as initializer");
> ^^^^^^^^^^^
>
> Should we not preserve the previous message? Now, it says
> "initializer" where it should be saying assignment, as in the
> testcase.
The previous message was:
ISO C++ forbids assignment of arrays
We should not say "ISO C++ forbids" anymore, as that is what we usually
put in pedantic error messages. And, complit1.C triggers this error
message from an initialization, rather than an assignment; this code is
used in both cases. I find it less confusing to say initializer for an
assignment than vice versa.
However, I have no strong feelings about the error message; feel free to
change it, if you like, without consulting with me.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc-patches
mailing list