Language
C++
Compiler
clang 3.1
Options
Warnings
Don't Use Boost
C++11(GNU)
no pedantic
$ clang++ prog.cc -Wall -Wextra -std=gnu++11
Exit Code:
1
Author
anonymous
over 6 years ago
C++
clang 3.1
Author
anonymous
over 6 years ago
$ clang++ prog.cc -Wall -Wextra -std=gnu++11
prog.cc:13:24: error: non-constant-expression cannot be narrowed from type 'int' to 'short' in initializer list [-Wc++11-narrowing]
int n = sizeof(short{duration(duration())});
^~~~~~~~~~~~~~~~~~~~
prog.cc:13:24: note: override this message by inserting an explicit cast
int n = sizeof(short{duration(duration())});
^~~~~~~~~~~~~~~~~~~~
static_cast<short>( )
1 error generated.