From 6bd8a5c78f6c9b480936e88eff6b44e9ea0ed577 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 9 Dec 2016 14:34:48 +0000 Subject: [PATCH] Prevent use of MEM_* attr accessor macros as lvalues gcc/ChangeLog: * rtl.h (get_mem_attrs): Add "const" qualifier to returned pointer. From-SVN: r243487 --- gcc/ChangeLog | 5 +++++ gcc/rtl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.30.2