aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c6
-rw-r--r--gcc/cp/pt.c2
3 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f5ce21f..ef48dc3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
+ Const-ification.
+ * pt.c (tsubst_decl): Likewise.
+
2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (lang_f_options): Const-ification.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 9020bb3..9244272 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3028,9 +3028,9 @@ static void
warn_extern_redeclared_static (newdecl, olddecl)
tree newdecl, olddecl;
{
- static const char *explicit_extern_static_warning
+ static const char *const explicit_extern_static_warning
= "`%D' was declared `extern' and later `static'";
- static const char *implicit_extern_static_warning
+ static const char *const implicit_extern_static_warning
= "`%D' was declared implicitly `extern' and later `static'";
tree name;
@@ -6574,7 +6574,7 @@ cp_make_fname_decl (id, type_dep)
tree id;
int type_dep;
{
- const char *name = (type_dep && processing_template_decl
+ const char *const name = (type_dep && processing_template_decl
? NULL : fname_as_string (type_dep));
tree init = cp_fname_init (name);
tree decl = build_decl (VAR_DECL, id, TREE_TYPE (init));
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 960ef44..05ce365 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5992,7 +5992,7 @@ tsubst_decl (t, args, type)
/* For __PRETTY_FUNCTION__ we have to adjust the initializer. */
if (DECL_PRETTY_FUNCTION_P (r))
{
- const char *name = (*decl_printable_name)
+ const char *const name = (*decl_printable_name)
(current_function_decl, 2);
DECL_INITIAL (r) = cp_fname_init (name);
TREE_TYPE (r) = TREE_TYPE (DECL_INITIAL (r));