This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: middle-end/9725: Invalid dependency determination
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <velco at fadata dot bg>
- Cc: <gcc-bugs at gcc dot gnu dot org>,<gcc-gnats at gcc dot gnu dot org>
- Date: Thu, 20 Feb 2003 08:39:50 +0100
- Subject: Re: middle-end/9725: Invalid dependency determination
Which doesn't work (and possibly doesn't have to as outlined in the
other mail, depending on how you interpret the wording of the standard)
when used as
(&u.s)->f1 = x;
(&u.s)->f2 = y;
which is (supposedly) equivalent to the use of the . operator...
Jan
>>> Momchil Velikov <velco at fadata dot bg> 19.02.03 22:10:36 >>>
>>>>> "Jan" == Jan Beulich <JBeulich at novell dot com> writes:
Jan> But why is the structure incompatible?
Jan> "... an aggregate or union type that includes one of the
aforementioned
Jan> types among its
Jan> members (including, recursively, a member of a subaggregate
or
Jan> contained union), ..."
which means that you example should be coded as
struct s
{
unsigned f1:16;
unsigned f2:16;
};
void
test (unsigned *pf, unsigned x, unsigned y)
{
union
{
unsigned f;
struct s s;
} u;
u.s.f1 = x;
u.s.f2 = y;
*pf = u.f;
}
~velco