This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] C/C++: Add -Waddress-of-packed-member


On Mon, 18 Jun 2018, Jason Merrill wrote:

> > +  if (TREE_CODE (rhs) == COND_EXPR)
> > +    {
> > +      /* Check the THEN path first.  */
> > +      tree op1 = TREE_OPERAND (rhs, 1);
> > +      context = check_address_of_packed_member (type, op1);
> 
> This should handle the GNU extension of re-using operand 0 if operand
> 1 is omitted.

Doesn't that just use a SAVE_EXPR?

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]