Re: strange behaviour of -O2 optimization

2004-01-06 Thread Nicolas François
On Mon, Jan 05, 2004 at 07:03:55PM -0500, Daniel Jacobowitz wrote: > On Tue, Jan 06, 2004 at 12:02:29AM +0100, Nicolas François wrote: > > #define LOW_WORD(x) (word)(x) > > #define HIGH_WORD(x) (*(((word *)&(x))+1)) > > You can't do this. I recommend you google for "strict aliasing" for a > numbe

Re: strange behaviour of -O2 optimization

2004-01-05 Thread Daniel Jacobowitz
On Tue, Jan 06, 2004 at 12:02:29AM +0100, Nicolas François wrote: > Hello, > > I had a look at the debian bug #225313. This bug only raise raise when > optimization is used. I've submitted a patch, but would like to > understand if gcc behaviour was normal. > > > I've selected a sample of code t

strange behaviour of -O2 optimization

2004-01-05 Thread Nicolas François
Hello, I had a look at the debian bug #225313. This bug only raise raise when optimization is used. I've submitted a patch, but would like to understand if gcc behaviour was normal. I've selected a sample of code that should raise the same issue: