Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 814 Bytes

compiler-warning-level-2-c4056.md

File metadata and controls

24 lines (19 loc) · 814 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 2) C4056
Compiler Warning (level 2) C4056
11/04/2016
C4056
C4056
a3c3a9b8-ec30-452d-96cb-3694adcce789

Compiler Warning (level 2) C4056

overflow in floating point constant arithmetic

Floating-point constant arithmetic generates a result that exceeds the maximum allowable value.

This warning can be caused by compiler optimizations performed during constant arithmetic. You can safely ignore this warning if it goes away when you turn off optimization (/Od).

The following sample generates C4056:

// C4056.cpp
// compile with: /W2 /LD
#pragma warning (default : 4056)
float fp_val = 1.0e300 * 1.0e300;   // C4056