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
This commit is contained in:
David Malcolm 2016-12-09 14:34:48 +00:00 committed by David Malcolm
parent ac9e52e72b
commit 6bd8a5c78f
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-12-09 David Malcolm <dmalcolm@redhat.com>
* rtl.h (get_mem_attrs): Add "const" qualifier to returned
pointer.
2016-12-09 Nathan Sidwell <nathan@acm.org>
PR C++/78550

View File

@ -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;