You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compilation results in a lot of warnings coming from the include of a GDAL OGR header file with GCC 13 and C GNU 17.
Including gdal/ogr_core.h results in multiple warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic].
To reproduce
This comes from multiple directories, e.g., include/grass/vect. I'm not sure what exact combination of versions and flags is causing this besides the obvious -Wpedantic.
Expected behavior
While the code is external to the project, the compilation output is full of the warnings. It seems that updating to -std=gnu2x solves the issue as the warning suggests, so maybe we can just wait.
Screenshots
In file included from /usr/include/gdal/ogr_api.h:45,
from /home/vpetras/Projects/grass/code/grass/dist.x86_64-pc-linux-gnu/include/grass/vect/dig_structs.h:27,
from /home/vpetras/Projects/grass/code/grass/dist.x86_64-pc-linux-gnu/include/grass/vect/digit.h:3,
from /home/vpetras/Projects/grass/code/grass/dist.x86_64-pc-linux-gnu/include/grass/vector.h:4,
from point.c:21:
/usr/include/gdal/ogr_core.h:512:19: warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
512 | wkbPoint25D = 0x80000001, /**< 2.5D extension as per 99-402 */
| ^~~~~~~~~~
/usr/include/gdal/ogr_core.h:513:24: warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
513 | wkbLineString25D = 0x80000002, /**< 2.5D extension as per 99-402 */
| ^~~~~~~~~~
/usr/include/gdal/ogr_core.h:514:21: warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
514 | wkbPolygon25D = 0x80000003, /**< 2.5D extension as per 99-402 */
| ^~~~~~~~~~
/usr/include/gdal/ogr_core.h:515:24: warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
515 | wkbMultiPoint25D = 0x80000004, /**< 2.5D extension as per 99-402 */
| ^~~~~~~~~~
/usr/include/gdal/ogr_core.h:516:29: warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
516 | wkbMultiLineString25D = 0x80000005, /**< 2.5D extension as per 99-402 */
| ^~~~~~~~~~
/usr/include/gdal/ogr_core.h:517:26: warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
517 | wkbMultiPolygon25D = 0x80000006, /**< 2.5D extension as per 99-402 */
| ^~~~~~~~~~
/usr/include/gdal/ogr_core.h:518:32: warning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
518 | wkbGeometryCollection25D = 0x80000007 /**< 2.5D extension as per 99-402 */
| ^~~~~~~~~~
^~~~~~~~~~
System description
Ubuntu 24.04.1 LTS (noble)
gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
-std=gnu17
main branch
The text was updated successfully, but these errors were encountered:
Describe the bug
Compilation results in a lot of warnings coming from the include of a GDAL OGR header file with GCC 13 and C GNU 17.
Including
gdal/ogr_core.h
results in multiplewarning: ISO C restricts enumerator values to range of ‘int’ before C2X [-Wpedantic]
.To reproduce
This comes from multiple directories, e.g.,
include/grass/vect
. I'm not sure what exact combination of versions and flags is causing this besides the obvious-Wpedantic
.Expected behavior
While the code is external to the project, the compilation output is full of the warnings. It seems that updating to
-std=gnu2x
solves the issue as the warning suggests, so maybe we can just wait.Screenshots
System description
-std=gnu17
The text was updated successfully, but these errors were encountered: