Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc HEAD 11.0.0 20200917 (experimental)

Options
Warnings
Boost 1.73.0
C++2a
no pedantic
Raw compiler options
-Wfloat-conversion

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=c++2a -Wfloat-conversion
prog.cc: In function 'int main()':
prog.cc:11:15: warning: conversion from 'double' to 'float' changes value from '2.71828e+0' to '2.71828008e+0f' [-Wfloat-conversion]
   11 |     float f = 2.71828;          // C4305 'initializing'
      |               ^~~~~~~
prog.cc:12:12: warning: conversion from 'double' to 'float' changes value from '3.1415899999999999e+0' to '3.14159012e+0f' [-Wfloat-conversion]
   12 |     item i(3.14159);            // C4305 'argument'
      |            ^~~~~~~
Exit Code:
2