On Fri, Feb 21, 2014 at 3:27 PM, Jens Nyberg <[email protected]> wrote:

> No, if you think about it a structure is like a tiny buffer. The only way
> to copy that is by using memcpy. This is why
>
Structs support bitwise copying without memcpy() (though perhaps it is used
internally to implement this), provided the size is known:

struct foo s1;
struct foo s2;
s1.x = ...;
s1.y = ...;
s2 = s1;
assert(s2.x == s1.x)

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to