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-ali

Re: About strict-aliasing warning

2009-02-13 Thread Ross Smith
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 pit

Re: About strict-aliasing warning

2009-02-13 Thread Paolo Bonzini
> "-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. I

About strict-aliasing warning

2009-02-13 Thread ccg ijsj
hi all, I wrote a simple testcase with some type prunned pointer and compiled it with -O2 option. I assumed that gcc would issue some warnings as told in its documents. But i am afraid that no warnings at all. I have to specify the -Wstrict-aliasing or -Wall option manually. Is this a docu

Re: [strict-aliasing] warning message contains compiler-generated symbols

2008-12-10 Thread Дмитрий Дьяченко
done PR #38477. I only was trying accuratly report. The message was readable but looks unusual. Dmitry 2008/12/10 Richard Guenther <[EMAIL PROTECTED]>: > On Wed, Dec 10, 2008 at 5:44 PM, Дмитрий Дьяченко <[EMAIL PROTECTED]> wrote: >> g++-current generates messages which >> 1) contains compiler g

Re: [strict-aliasing] warning message contains compiler-generated symbols

2008-12-10 Thread Richard Guenther
On Wed, Dec 10, 2008 at 5:44 PM, Дмитрий Дьяченко <[EMAIL PROTECTED]> wrote: > g++-current generates messages which > 1) contains compiler generated symbols > 2) refers to gcc internal header (stl_tree.h) > > [EMAIL PROTECTED] gcc_err]# g++ -Wall -c -O3 test.cpp > test.cpp: In member function 'void

[strict-aliasing] warning message contains compiler-generated symbols

2008-12-10 Thread Дмитрий Дьяченко
g++-current generates messages which 1) contains compiler generated symbols 2) refers to gcc internal header (stl_tree.h) [EMAIL PROTECTED] gcc_err]# g++ -Wall -c -O3 test.cpp test.cpp: In member function 'void test::bar(std::_List_iterator >&)': test.cpp:14: warning: dereferencing pointer '__x.13

Re: strict aliasing warning

2006-11-30 Thread Joel Sherrill
Andrew Haley wrote: Joel Sherrill writes: > Silvius Rus wrote: > > > > I wrote some code (not released yet) that improves the accuracy of > > -Wstrict-aliasing using tree-ssa-alias information. The primary idea > > was to tell the programmer "go fix the types of variables x and y at > >

Re: strict aliasing warning

2006-11-30 Thread Andrew Haley
Joel Sherrill writes: > Silvius Rus wrote: > > > > I wrote some code (not released yet) that improves the accuracy of > > -Wstrict-aliasing using tree-ssa-alias information. The primary idea > > was to tell the programmer "go fix the types of variables x and y at > > lines ..." when -fstr

Re: strict aliasing warning

2006-11-29 Thread Silvius Rus
Joe Buck wrote: If you first prove that there is no cross-type aliasing, then turn on -fstrict-aliasing, it seems to me that your alias sets won't change at all. The reason is that if there is a change, it means that you eliminated an aliasing possibility based on the fact that it's not allowe

Re: strict aliasing warning

2006-11-29 Thread Silvius Rus
Joel Sherrill wrote: Silvius Rus wrote: I wrote some code (not released yet) that improves the accuracy of -Wstrict-aliasing using tree-ssa-alias information. The primary idea was to tell the programmer "go fix the types of variables x and y at lines ..." when -fstrict-aliasing breaks thei

Re: strict aliasing warning

2006-11-29 Thread Joel Sherrill
Silvius Rus wrote: I wrote some code (not released yet) that improves the accuracy of -Wstrict-aliasing using tree-ssa-alias information. The primary idea was to tell the programmer "go fix the types of variables x and y at lines ..." when -fstrict-aliasing breaks their code. It occurred t

Re: strict aliasing warning

2006-11-29 Thread Joe Buck
On Wed, Nov 29, 2006 at 11:02:51AM -0800, Silvius Rus wrote: > > I wrote some code (not released yet) that improves the accuracy of > -Wstrict-aliasing using tree-ssa-alias information. The primary idea > was to tell the programmer "go fix the types of variables x and y at > lines ..." when -f

strict aliasing warning

2006-11-29 Thread Silvius Rus
I wrote some code (not released yet) that improves the accuracy of -Wstrict-aliasing using tree-ssa-alias information. The primary idea was to tell the programmer "go fix the types of variables x and y at lines ..." when -fstrict-aliasing breaks their code. It occurred to me that part of th