From 5f9bda14580c475eabae3b82f96041932e2e6402 Mon Sep 17 00:00:00 2001 From: Prathamesh Kulkarni Date: Mon, 18 Jun 2018 14:04:37 +0000 Subject: [PATCH] tree.c (escaped_string::escape): Replace cast to char * by const_cast (unescaped). 2018-06-18 Prathamesh Kulkarni * tree.c (escaped_string::escape): Replace cast to char * by const_cast (unescaped). From-SVN: r261700 --- gcc/ChangeLog | 5 +++++ gcc/tree.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4134a2ca716..56401fbf9b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-06-18 Prathamesh Kulkarni + + * tree.c (escaped_string::escape): Replace cast to char * by + const_cast (unescaped). + 2018-06-18 Nick Clifton PR 84195 diff --git a/gcc/tree.c b/gcc/tree.c index 6728f1c2ce6..889d88c50b4 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -12454,7 +12454,7 @@ escaped_string::escape (const char *unescaped) if (m_owned) free (m_str); - m_str = (char *) unescaped; + m_str = const_cast (unescaped); m_owned = false; if (unescaped == NULL || *unescaped == 0) -- 2.30.2