From 8dfbae2b12f2229ef1bf243a03f142759c2340a9 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Fri, 9 Dec 2016 14:34:48 +0000 Subject: Prevent use of MEM_* attr accessor macros as lvalues gcc/ChangeLog: * rtl.h (get_mem_attrs): Add "const" qualifier to returned pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243487 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/rtl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d2e5f478cc4..91dfc18bf9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-12-09 David Malcolm + + * rtl.h (get_mem_attrs): Add "const" qualifier to returned + pointer. + 2016-12-09 Nathan Sidwell PR C++/78550 diff --git a/gcc/rtl.h b/gcc/rtl.h index a5efa282a15..4f0efa61aa8 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -3355,7 +3355,7 @@ extern struct target_rtl *this_target_rtl; #ifndef GENERATOR_FILE /* Return the attributes of a MEM rtx. */ -static inline struct mem_attrs * +static inline const struct mem_attrs * get_mem_attrs (const_rtx x) { struct mem_attrs *attrs; -- cgit v1.2.1