Index: include/llvm/Support/JSON.h =================================================================== --- include/llvm/Support/JSON.h +++ include/llvm/Support/JSON.h @@ -452,7 +452,10 @@ new (reinterpret_cast(Union.buffer)) T(std::forward(V)...); } template T &as() const { - return *reinterpret_cast(Union.buffer); + // Using this double static_cast<> via void * instead of reinterpret_cast<> + // silences a -Wstrict-aliasing warning from GCC. + void *p = static_cast(Union.buffer); + return *static_cast(p); } template