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: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: velco at fadata dot bg, <gcc-bugs at gcc dot gnu dot org>, <gcc-gnats at gcc dot gnu dot org>
- Date: Wed, 19 Feb 2003 10:59:46 -0600 (CST)
- Subject: Re: middle-end/9725: Invalid dependency determination
> struct s {
> unsigned f1:16;
> unsigned f2:16;
> };
>
> void test(unsigned *pf, unsigned x, unsigned y) {
> unsigned f;
>
> ((struct s*)&f)->f1 = x;
> ((struct s*)&f)->f2 = y;
> *pf = f;
> }
You still try to access the bits of the unsigned int variable f through
the bits of the incompatible structure s. Short answer: don't do that.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at ticam dot utexas dot edu
www: http://www.ticam.utexas.edu/~bangerth/