Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 5 years ago

Language

C++

Compiler

gcc 8.2.0

Options
Warnings
Boost 1.71.0
C++2a(GNU)
no pedantic
Raw compiler options
-Wnarrowing

Author

anonymous

about 5 years ago

resource

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/gcc-8.2.0/include -std=gnu++2a -Wnarrowing
prog.cc: In instantiation of 'void vecprint2d(const s&) [with s = std::vector<std::vector<int> >]':
prog.cc:20:15:   required from here
prog.cc:8:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
     for(int x = 0; x < vec.size(); x++){
prog.cc:10:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
         for(int y = 0; y < vec[x].size() - 1;y++){
                        ~~^~~~~~~~~~~~~~~~~~~
{
{1, 2, 3}
{4, 5, 6}
}
Exit Code:
0