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] |
You're reading too much into the comment.
Indeed, because it is *highly* misleading to have a comment which says that the only justification is the historical one and gets the history wrong.
Because the middle end defines the semantics. There are two possibilities: (a) the middle end conditionally creates the temporary, depending on some property of the type that indicates whether or not the type may be copied, or (b) the front ends promise only to produce volatile lvalues as stand-alone expressions if the copy is in fact possible. Either (a) or (b) will work, but (b) seems marginally better to me, since it reduces the amount of pointless IL we will feed to the middle end. I don't feel strongly about that, though.
If I were to design it from scratch, I would not feel strongly either. But we have a long-established semantics in GCC 2.x and 3.x and, barring any strong impetus, I think we should retain it in 4.x and later.
-- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |