Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Quentin Pope <qp19433@hotmail.NOSPAM.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Another Union question |
| Date | 2011-09-06 21:01 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <j461mk$pcu$1@speranza.aioe.org> (permalink) |
We know that &struct is equiv to &struct.firstMember. So far so good.
Now I have an union
union r32{
uint8 l;
uint16 x;
uint32 val;
};
union r32 reg;
and a function
void f(union r32* a){a->x=1;}
then
is to do f(®.x) or f(®.l) or f(®.val) OK or not?
is it ®.x=®.l=®.val ?
Or I have to do f(®)?
Back to comp.lang.c | Previous | Next — Next in thread | Find similar | Unroll thread
Another Union question Quentin Pope <qp19433@hotmail.NOSPAM.com> - 2011-09-06 21:01 +0000
Re: Another Union question James Kuyper <jameskuyper@verizon.net> - 2011-09-06 17:44 -0400
Re: Another Union question Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-07 02:08 +0100
Re: Another Union question James Kuyper <jameskuyper@verizon.net> - 2011-09-07 08:04 -0400
Re: Another Union question Keith Thompson <kst-u@mib.org> - 2011-09-06 18:33 -0700
csiph-web