C
CBFalconer
Keith said:CBFalconer said:Keith Thompson wrote: [...]Here's what n1336 6.2.4p7 says (I think it's already been quoted in
this thread):
Yes, it has. And it has also been pointed out that n1336 is a very
preliminary draft for a future C1x standard. My comments have been
to the effect that I don't think this particular proposal will
live, and why not.
And the point of my reply was to refute your arguments. You're
claiming that the proposal "will involve too many ugly
inefficiencies". You snipped the paragraph in which I explained why
this is not the case:
| The proposed change in n1336 applies *only* to a structure or union
| that contains (directly or indirectly) an array member. In the
| majority of such cases, the struct or union is already too big to fit
| in a register. For any other function results, the returned value is
| not stored in an object, either implicitly or explicitly (though of
| course the compiler is still free to do the equivalent of storing it
| in an object internally).
|
| "&strlen(thing)" is still a constraint violation.
Certainly (the violation).
Why do you want to treat some returned values in one manner, and
others in another manner? C has enough silly complexities, and
doesn't need another one. IMO. The simplest thing is to insist on
storing that value somewhere, after which you are free to play with
it. That can be a universal rule.