--- title: Warning C26471 ms.date: 03/22/2018 f1_keywords: ["C26471", "NO_REINTERPRET_CAST_FROM_VOID_PTR"] helpviewer_keywords: ["C26471"] description: CppCoreCheck rule C26471 that enforces C++ Core Guidelines Type.1 --- # Warning C26471 > Don't use `reinterpret_cast`. A cast from `void*` can use `static_cast` (type.1) ## Remarks Code analysis name: `NO_REINTERPRET_CAST_FROM_VOID_PTR` ## Example ```cpp void function(void* pValue) { { int* pointerToInt = reinterpret_cast(pValue); // C26471, use static_cast instead } { int* pointerToInt = static_cast(pValue); // Good } } ``` ## See also [C++ Core Guidelines Type.1](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Pro-type-reinterpretcast)