[Bug c/60809] C99 struct initialiser with embedded self assignment
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 10 14:01:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60809
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I see nothing surprising here; an assignment expression has the value of the
left operand after the assignment. So we 1) set query2.ai_flags to AI_PASSIVE,
2) use this value to initialize .ai_protocol.
I'm not sure a warning here makes sense: an assignment-expression is perfectly
valid initializer.
More information about the Gcc-bugs
mailing list