Commit 9db8e6c
committed
goto-cc: Fix compilation with GCC 11
The reference type caused following error:
/builddir/build/BUILD/cbmc/src/goto-cc/ms_link_cmdline.cpp:337:26: error: loop variable 'ms_link_option' of type 'const string&' {aka 'const std::__cxx11::basic_string<char>&'} binds to a temporary constructed from type 'const char*' [-Werror=range-loop-construct]
337 | for(const std::string &ms_link_option : ms_link_options)
| ^~~~~~~~~~~~~~
/builddir/build/BUILD/cbmc/src/goto-cc/ms_link_cmdline.cpp:337:26: note: use non-reference type 'const string' {aka 'const std::__cxx11::basic_string<char>'} to make the copy explicit or 'const char* const&' to prevent copying1 parent eea16dd commit 9db8e6c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| |||
0 commit comments