Re: About strict-aliasing warning

2009-02-14 Thread ccg ijsj
 OK, thank you very much. I interpreted it wrongly.

 And I agree with Ross's suggestion like "This option has no
effect unless -fstrict-aliasing is active".

 One more question is why we won't make it "sufficient condition"?
I think many newbies like me would not know about "strict-aliasing".
But when we turn on -O2 options, the behavior after apply
strict-aliasing may produce incorrect code.
So if there is not any warnings, the incorrect behavior after applying
strict-aliasing would lead to a misconception that GCC is buggy?
Also, it would cost some time to debug and find the truth about
"strict-aliasing".
//I think I have learned a great lesson that I should always use -Wall
options first to avoid implicitly turned on optimizations without
warnings



Best,
Jim

On Fri, Feb 13, 2009 at 6:53 PM, Paolo Bonzini  wrote:
>
>> "-Wstrict-aliasing
>> This option is only active when -fstrict-aliasing is active. It
>> warns about code which might
>> break the strict aliasing rules that the compiler is using for
>> optimization. The warning does
>> not catch all cases, but does attempt to catch the more common
>> pitfalls. It is included in -Wall.
>> It is equivalent to -Wstrict-aliasing=3 "
>>
>> and -O2 would active -fstrict-aliasing by default, which should also
>> active this options.
>
> No, the text above means that "-fstrict-aliasing" is a *necessary*
> condition to get aliasing warnings, not a sufficient condition.
>
> Do you have suggestions for how to clarify the text?
>
> Paolo
>


Re: IRA conflict graph & alternative selection

2009-02-14 Thread Steven Bosscher
On Fri, Feb 13, 2009 at 8:53 PM, Jeff Law  wrote:
>>> That is in brief how I see it and there are a lot of reload details
>>> missed (like virtual register eliminations or addressing displacement
>>> constraints etc).
>>>
>>
>> I suppose those would stay in reload?
>
> Ideally they'd all move into IRA.

...and so, IRA became evil to destroy evil...  :-)

Gr.
Steven