[cfe-commits] Bunch of aliasing rules violations warnings in clang

Anton Korobeynikov asl at math.spbu.ru
Thu May 29 10:58:31 PDT 2008


Hello, Everyone. 

I'm seeing the following warnings on TOT clang compilation.

/home/asl/proj/llvm/src/tools/clang/lib/AST/CFG.cpp: In member function
‘const std::pair<clang::CFGBlock*, clang::CFGBlock*>*
clang::CFG::getBlockEdgeImpl(const clang::CFGBlock*, const
clang::CFGBlock*)’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/CFG.cpp:1181: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/CFG.cpp:1186: warning:
dereferencing type-punned pointer will break strict-aliasing rules

/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ObjCIvarRefExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1183: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ObjCIvarRefExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1187: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ImaginaryLiteral::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1208: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ImaginaryLiteral::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1211: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ParenExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1220: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ParenExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1223: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::UnaryOperator::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1228: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ArraySubscriptExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1249: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ArraySubscriptExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1252: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::MemberExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1265: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::MemberExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1268: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator
clang::ExtVectorElementExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1273: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ExtVectorElementExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1276: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::CompoundLiteralExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1281: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::CompoundLiteralExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1284: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ImplicitCastExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1289: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ImplicitCastExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1292: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::CastExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1297: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::CastExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1300: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::BinaryOperator::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1305: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::BinaryOperator::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1308: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ConditionalOperator::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1313: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ConditionalOperator::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1316: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::StmtExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1325: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::StmtExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1328: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ChooseExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1342: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::ChooseExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1346: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::VAArgExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1367: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp: In member function
‘virtual clang::StmtIterator clang::VAArgExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Expr.cpp:1371: warning:
dereferencing type-punned pointer will break strict-aliasing rules

/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp: In member
function ‘virtual clang::StmtIterator
clang::CXXCastExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp:24: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp: In member
function ‘virtual clang::StmtIterator clang::CXXCastExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp:27: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp: In member
function ‘virtual clang::StmtIterator
clang::CXXThrowExpr::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp:40: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp: In member
function ‘virtual clang::StmtIterator clang::CXXThrowExpr::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp:45: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/ExprCXX.cpp:46: warning:
dereferencing type-punned pointer will break strict-aliasing rules

/home/asl/proj/llvm/src/tools/clang/lib/AST/Stmt.cpp: In member function
‘virtual clang::StmtIterator clang::IndirectGotoStmt::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Stmt.cpp:249: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Stmt.cpp: In member function
‘virtual clang::StmtIterator clang::ReturnStmt::child_begin()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Stmt.cpp:264: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/Stmt.cpp: In member function
‘virtual clang::StmtIterator clang::ReturnStmt::child_end()’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/Stmt.cpp:269: warning:
dereferencing type-punned pointer will break strict-aliasing rules

/home/asl/proj/llvm/src/tools/clang/lib/AST/StmtIterator.cpp: In member
function ‘clang::Stmt*& clang::StmtIteratorBase::GetDeclExpr() const’:
/home/asl/proj/llvm/src/tools/clang/lib/AST/StmtIterator.cpp:107:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/StmtIterator.cpp:112:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
/home/asl/proj/llvm/src/tools/clang/lib/AST/StmtIterator.cpp:116:
warning: dereferencing type-punned pointer will break strict-aliasing
rules

/home/asl/proj/llvm/src/tools/clang/lib/Analysis/GRExprEngine.cpp: In
member function ‘void
clang::GRExprEngine::VisitBinaryOperator(clang::BinaryOperator*,
clang::ExplodedNode<clang::ValueState>*,
clang::ExplodedNodeSet<clang::ValueState>&)’:
/home/asl/proj/llvm/src/tools/clang/lib/Analysis/GRExprEngine.cpp:2038:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
/home/asl/proj/llvm/src/tools/clang/lib/Analysis/GRExprEngine.cpp:2040:
warning: dereferencing type-punned pointer will break strict-aliasing
rules

/home/asl/proj/llvm/src/tools/clang/lib/Analysis/RValues.cpp: In member
function ‘const clang::SymbolID* clang::RVal::symbol_begin() const’:
/home/asl/proj/llvm/src/tools/clang/lib/Analysis/RValues.cpp:32:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
/home/asl/proj/llvm/src/tools/clang/lib/Analysis/RValues.cpp:34:
warning: dereferencing type-punned pointer will break strict-aliasing
rules

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.





More information about the cfe-commits mailing list