https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92666

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
The check_function_restrict() function is called to do the -Wrestrict checking.
 It's called conditionally, from check_function_arguments(), when warn_restrict
is nonzero.  When called, the function calls fold_for_warn() for all arguments
of the functions it checks for aliasing violations.  fold_for_warn() ends up
calling mark_rvalue_use() which ultimately calls mark_exp_read() which sets
DECL_READ_P (exp) = 1 for VAR_DECL and PARM_DECL.  None of this happens when
-Wno-restrict is set.

Reply via email to