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
-Wconversion

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=c++2a -Wconversion
prog.cc: In function 'int main()':
prog.cc:10:12: warning: conversion from 'int' to 'char' may change value [-Wconversion]
   10 |    a = func();   // C4242, return type and variable type do not match
      |        ~~~~^~
prog.cc:9:9: warning: variable 'a' set but not used [-Wunused-but-set-variable]
    9 |    char a;
      |         ^
Exit Code:
0