gcc(g++)において、古いCスタイルキャストが使われた場合に警告するオプション。
Using the GNU Compiler Collection (GCC) - 3.5 C++ Dialect Options
-Wold-style-cast
(C++ and Objective-C++ only)
Warn if an old-style (C-style) cast to a non-void type is used within a C++ program. The new-style casts ('dynamic_cast
', 'static_cast
', 'reinterpret_cast
', and 'const_cast
') are less vulnerable to unintended effects and much easier to search for.
関連URL