Language
C++
Compiler
gcc HEAD 11.0.0 20201030 (experimental)
Options
Warnings
Don't Use Boost
C++2a
-pedantic
$ g++ prog.cc -Wall -Wextra -std=c++2a -pedantic Signal:
Segmentation fault
Author
anonymous
about 5 years ago
C++
gcc HEAD 11.0.0 20201030 (experimental)
Author
anonymous
about 5 years ago
$ g++ prog.cc -Wall -Wextra -std=c++2a -pedantic prog.cc: In function 'int main()':
prog.cc:7:14: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'const string_view' {aka 'const std::basic_string_view<char>'} [-Wformat=]
7 | printf("%s", s);
| ~^ ~
| | |
| | const string_view {aka const std::basic_string_view<char>}
| char*