Closed sambo57u closed 3 years ago
Interesting. Are you building a release or the latest in master? If you are building the release, please try to see if it is fixed in master.
If you are building master, then I expect this to be a pretty easy fix. Looks like the header <limits>
was not included in Execute.cpp when it should be.
I am building the master. Also in Compile.cpp. After inserting those headers it build fine. Thanks!
Fixed in master, thanks!
Hi, I just moved from Fedora 33 to 34, which uses gcc-11. When I try to build nedit-ng it quickly gives an error below:
.... Scanning dependencies of target Regex [ 1%] Building CXX object Regex/CMakeFiles/Regex.dir/Execute.cpp.o /root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp: In function 'uint32_t {anonymous}::greedy(uint8_t, uint32_t)': /root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp:137:62: error: 'numeric_limits' is not a member of 'std' 137 | const uint32_t max_cmp = (max > 0) ? max : std::numeric_limits::max();
| ^::max();
| ^
/root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp:137:88: error: '::max' has not been declared; did you mean 'std::max'?
137 | const uint32_t max_cmp = (max > 0) ? max : std::numeric_limits::max();
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/qt5/QtCore/qglobal.h:142,
from /usr/include/qt5/QtCore/QtGlobal:1,
from /root/rpmbuild/BUILD/nedit-ng-2020.2/Util/include/Util/Compiler.h:5,
from /root/rpmbuild/BUILD/nedit-ng-2020.2/Util/include/Util/Raise.h:5,
from /root/rpmbuild/BUILD/nedit-ng-2020.2/Util/include/Util/string_view.h:5,
from /root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.h:6,
from /root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp: In function 'bool {anonymous}::match(uint8_t , size_t*)':
/root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp:580:53: error: 'numeric_limits' is not a member of 'std'
580 | uint32_t min = std::numeric_limits::max();
| ^::max();
| ^
/root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp:580:79: error: '::max' has not been declared; did you mean 'std::max'?
580 | uint32_t min = std::numeric_limits::max();
| ^~~
| std::max
In f
.....
~~~~~ /root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp:137:85: error: expected primary-expression before '>' token 137 | const uint32_t max_cmp = (max > 0) ? max : std::numeric_limits~~~~~ /root/rpmbuild/BUILD/nedit-ng-2020.2/Regex/Execute.cpp:580:76: error: expected primary-expression before '>' token 580 | uint32_t min = std::numeric_limits