re PR c++/335 (gcc accepts assignment in read-only structures)
authorNathan Sidwell <nathan@codesourcery.com>
Sat, 29 Dec 2001 17:10:10 +0000 (17:10 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sat, 29 Dec 2001 17:10:10 +0000 (17:10 +0000)
commit03c9c274624a94356dffd1cd62ff9669a8a1039a
treed6c3ce64a187a221e478142f0138060f138530c8
parent1bf0567179b2828650b21eced842742526039651
re PR c++/335 (gcc accepts assignment in read-only structures)

cp:
PR c++/335
* init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
for non-reference fields.
* typeck.c (require_complete_type): Use resolve_offset_ref).
testsuite:
* g++.dg/other/const1.C: New test.

From-SVN: r48369
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/const1.C [new file with mode: 0644]