From: David Malcolm Date: Fri, 9 Dec 2016 14:34:48 +0000 (+0000) Subject: Prevent use of MEM_* attr accessor macros as lvalues X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6bd8a5c78f6c9b480936e88eff6b44e9ea0ed577;p=gcc.git 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 --- 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;