[cfe-dev] new warnings n -r61596
Sebastian Redl
sebastian.redl at getdesigned.at
Mon Jan 5 11:38:39 PST 2009
Douglas Gregor wrote:
> On Jan 2, 2009, at 4:23 PM, Mike Stump wrote:
>
>
>> DeclCXX.cpp: In member function 'clang::Decl**
>> clang::LinkageSpecDecl::decls_begin() const':
>> DeclCXX.cpp:326: warning: dereferencing type-punned pointer will break
>> strict-aliasing rules
>> DeclCXX.cpp: In member function 'clang::Decl**
>> clang::LinkageSpecDecl::decls_end() const':
>> DeclCXX.cpp:331: warning: dereferencing type-punned pointer will break
>> strict-aliasing rules
>>
>
> Thanks, Mike, but I'm a bit confused: I've turned on -Wstrict-aliasing
> and I don't see this warning, so I don't know how to suppress it. I
> believe that the code itself is correct (the void* decl is either
> handled as a Decl* or as a Decl**, depending on the HadBraces bit).
>
I've seen the warning, but only in a release build. Perhaps it depends
on an analysis that GCC doesn't do without optimizations?
Sebastian
More information about the cfe-dev
mailing list