| Liste des Groupes | Revenir à cl c |
James Kuyper <jameskuyper@alumni.caltech.edu> writes:...On 5/3/25 20:37, Keith Thompson wrote:
...I don't believe so. In a quick look, I don't see anything in
the standard that explicitly addresses this, but I believe that a
conforming implementation could implement structure assignment by
copying the individual members, leaving any padding in the target
undefined.
>Finally, why would you care?>
The fact that an implementation does not have to do the equivalent of
memcpy() to perform a struct copy means that successful assignment
cannot be checked by using memcmp().
Are you referring to checking whether an assignment was performed
or not, due to uncertainty about what the program has done? If you
mean doing an assignment and then checking whether it succeeded,
I can't think of a context where that makes sense.
Les messages affichés proviennent d'usenet.