Commit bbbd6700 by Richard Kenner

(mark_addressable): Give different error if trying to put object with volatile…

(mark_addressable): Give different error if trying to put object with volatile fields into register...

(mark_addressable): Give different error if trying to put object with
volatile fields into register; don't use DECL_NAME.

From-SVN: r8115
parent fc4a0dca
......@@ -3223,6 +3223,18 @@ mark_addressable (exp)
IDENTIFIER_POINTER (DECL_NAME (x)));
return 0;
}
/* If we are making this addressable due to its having
volatile components, give a different error message. Also
handle the case of an unnamed parameter by not trying
to give the name. */
else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x)))
{
error ("cannot put object with volatile field into register");
return 0;
}
pedwarn ("address of register variable `%s' requested",
IDENTIFIER_POINTER (DECL_NAME (x)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment