As I have been transferring my PROS code to the new kernel a new warning has appeared when I build the code. I narrowed the error down to std::vector and the .push_back command. Below is some sample code that produces the error:
std::vector<double> test;
test.push_back(1071.4);
test.push_back(74205.1);
This produced this warning:
prosv5 build
Compiled src/lib.cpp [WARNINGS]
In file included from /usr/local/Cellar/arm-gcc-bin/8-2018-q4-major/arm-noneeabi/include/c++/8.2.1/vector:69,
from ./include/libtest/lib.hpp:3,
from src/lib.cpp:1:
/usr/local/Cellar/arm-gcc-bin/8-2018-q4-major/arm-none-eabi/include/c++/8.2.1/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {double}; _Tp = double; _Alloc = std::allocator<double>]':
/usr/local/Cellar/arm-gcc-bin/8-2018-q4-major/arm-none-eabi/include/c++/8.2.1/bits/vector.tcc:413:7: note: parameter passing for argument of type 'std::vector<double>::iterator' {aka '__gnu_cxx::__normal_iterator<double*, std::vector<double> >'} changed in GCC 7.1
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/arm-gcc-bin/8-2018-q4-major/arm-none-eabi/include/c++/8.2.1/bits/vector.tcc: In function 'bool addVector(std::__cxx11::string)':
/usr/local/Cellar/arm-gcc-bin/8-2018-q4-major/arm-none-eabi/include/c++/8.2.1/bits/vector.tcc:109:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector<double> >' changed in GCC 7.1
_M_realloc_insert(end(), std::forward<_Args>(__args)...);
^~~~~~~~~~~~~~~~~
/usr/local/Cellar/arm-gcc-bin/8-2018-q4-major/arm-none-eabi/include/c++/8.2.1/bits/vector.tcc:109:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector<double> >' changed in GCC 7.1
_M_realloc_insert(end(), std::forward<_Args>(__args)...);
^~~~~~~~~~~~~~~~~
Adding timestamp [OK]
Linking hot project with ./bin/cold.package.elf and libc,libm,libpros,okapilib [OK]
Section sizes:
text data bss total hex filename
1248 8 3 1259 4eb bin/hot.package.elf
Creating bin/hot.package.bin for VEX EDR V5 [DONE]
Capturing metadata for PROS Editor...
What is weird is that this error only appears when the vector type is double. Float, int, char, string, bool all don’t produce this error. I fixed the warning by changing to type float but I am curious on to why this error is being produced. I’m running the new PROS kernel 3.2.0 and the warning wasn’t showing in 3.1.6. Thanks for any help in advance!
1069B - Argonauts