OSDN Git Service

PR c++/20073
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Feb 2005 06:52:08 +0000 (06:52 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Feb 2005 06:52:08 +0000 (06:52 +0000)
commitf06b15bfb9acf251ef6ccdec08f6a797ff3d54ea
tree9a11503ef0327d6e92a1bee2233d9b9330f316b0
parent7b97b9472661263906a6e8debfc71a9e0b24013f
PR c++/20073
* decl.c (start_decl_1): Don't clear TREE_READONLY.
(cp_finish_decl): Likewise.
(complete_vars): Call cp_apply_type_quals_to_decl.
* typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
cases where that's not valid.

PR c++/20073
* g++.dg/init/const1.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95441 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/decl.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/const1.C [new file with mode: 0644]