aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2001-02-17 19:00:29 -0500
committerJason Merrill <jason@gcc.gnu.org>2001-02-17 19:00:29 -0500
commita714e5c5d34f921252d147a23ff3bc0642413824 (patch)
treeb1df6ce88ec335187d7ab55035afb765383f2829 /gcc/cp/decl2.c
parent8084b91ec40a180177d76f34b3a77a9dedf6d0df (diff)
downloadgcc-a714e5c5d34f921252d147a23ff3bc0642413824.zip
gcc-a714e5c5d34f921252d147a23ff3bc0642413824.tar.gz
gcc-a714e5c5d34f921252d147a23ff3bc0642413824.tar.bz2
decl2.c (build_artificial_parm): Set TREE_READONLY.
* decl2.c (build_artificial_parm): Set TREE_READONLY. * decl.c (bad_specifiers): Allow throw specs on things with pointer-to-function or -member-function type. * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize a pmf. From-SVN: r39810
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 9f79148..20aa6a8 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -917,6 +917,9 @@ build_artificial_parm (name, type)
parm = build_decl (PARM_DECL, name, type);
DECL_ARTIFICIAL (parm) = 1;
+ /* All our artificial parms are implicitly `const'; they cannot be
+ assigned to. */
+ TREE_READONLY (parm) = 1;
DECL_ARG_TYPE (parm) = type;
return parm;
}