Bug 432709
| Summary: | algorithmfwd.h macro "max" passed 3 arguments, but takes just 2 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Balint Cristian <cristian.balint> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-02-14 14:10:46 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Balint Cristian
2008-02-13 22:47:45 UTC
Most likely some of the headers you included before <algorithm> defines #define max(x, y) something which you of course can't do before including a standard header. Just run g++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I. -I.. -I../.. -I/builddir/build/BUILD/gdal-1.5.0-fedora/port -I/builddir/build/BUILD/gdal-1.5.0-fedora/gcore -I/builddir/build/BUILD/gdal-1.5.0-fedora/alg -I/builddir/build/BUILD/gdal-1.5.0-fedora/ogr -I/builddir/build/BUILD/gdal-1.5.0-fedora/ogr/ogrsf_frmts -DOGR_ENABLED -I/usr/include/ogdi -I/usr/include/netcdf-3 -I/usr/include/hdf -I/usr/include/libgeotiff -I/usr/include/libdap -I/builddir/build/BUILD/gdal-1.5.0-fedora/port -Iexternal/include -I/usr/include/cfitsio -I/usr/include/cfitsio/include -E -dD ogrgeojsonlayer.cpp -fPIC -DPIC > /tmp/ogrgeojsonlayer.ii and see what defines max. Yes, i sorted out. Right fix was to move <algorithm> before any header inclusion on top of .c file to avoid conflicts. max was defined somewhere probably for other platforms, it was defined using #ifdef pragmas at all but order wasnt correct, gcc-43 dont pick up <algorithm> anymore by default. |