Language
C++
Compiler
gcc HEAD 10.0.0 20190527 (experimental)
Options
Warnings
Boost 1.70.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=gnu++2a
3
1 3 1
Exit Code:
0
Author
anonymous
almost 6 years ago
C++
gcc HEAD 10.0.0 20190527 (experimental)
Author
anonymous
almost 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:19:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
19 | printf("%d\n",v.size()-1);
| ~^ ~~~~~~~~~~
| | |
| int std::vector<int>::size_type {aka long unsigned int}
| %ld
prog.cc:20:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
20 | for (int i=1;i<v.size();i++)
| ~^~~~~~~~~
3
1 3 1