This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6331: g++ 3.1 looses const qualifiers
>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
> Shucks, we were duplicating work; I was working on that too.
Oops. I was guessing that you hadn't started on it yet.
> When I tried the change you made to build_modify_expr, I got a failure in
> this g++.benjamin/14664-1.c, which tests that we cannot assign a string
> literal to an array of characters (because the array of characters is
> const). This is probably a goofy test; what should be interesting is
> whether we can assign the element types and it looks like the logic
> for creating this test was that EDG issues an error -- but about array
> assignment in general.
I agree.
> Anyhow, did you change the test, or did it still pass for you?
Neither; I failed to notice the failure in my testrun. Double oops.
The original bug report that the testcase is derived from complained about
the error; the customer said that either the extension should be dropped or
the testcase should be accepted. Neither of those came to pass.
I wouldn't object to making the pedwarn unconditional.
Jason