Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std::max from algorithm to fix build failure with GCC 6.2. #6

Merged
merged 1 commit into from Oct 21, 2016

Conversation

sebastic
Copy link
Contributor

@sebastic sebastic commented Sep 1, 2016

Lucas Nussbaum reported that sosi2osm failed to build in Debian Bug #835717:

g++ -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 `pkg-config --cflags lua5.1-c++ fyba` -DLINUX -DUNIX -g  -c -o node.o node.cpp
node.cpp: In function 'long int createNode(double, double, short int)':
node.cpp:54:31: error: 'max' was not declared in this scope
      sizeM = max(1024, sizeM*2);
                               ^
<builtin>: recipe for target 'node.o' failed
make[1]: *** [node.o] Error 1

This appears to have been triggered by the update to GCC 6.2, and using std::max() from algorithm resolves the issue.

This change has already been included as patch in the Debian package to fix the release critical bugreport.

Fixes build failure with GCC 6.2.
@Gnonthgol Gnonthgol merged commit 4ead7f5 into Gnonthgol:master Oct 21, 2016
@sebastic sebastic deleted the std-max branch October 22, 2016 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants