diff --git a/ogr/ogr_core.h b/ogr/ogr_core.h index f64ecc40d6de..6fe905d750f3 100644 --- a/ogr/ogr_core.h +++ b/ogr/ogr_core.h @@ -391,6 +391,13 @@ typedef int OGRBoolean; /* ogr_geometry.h related definitions. */ /* -------------------------------------------------------------------- */ +#if defined(HAVE_GCC_DIAGNOSTIC_PUSH) && __STDC_VERSION__ < 202311L +/* wkbPoint25D and friends cause warnings with -Wpedantic prior to C23. */ +/* Cf https://github.com/OSGeo/gdal/issues/2322 */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" +#endif + /** * List of well known binary geometry types. These are used within the BLOBs * but are also returned from OGRGeometry::getGeometryType() to identify the @@ -512,6 +519,10 @@ typedef enum #endif } OGRwkbGeometryType; +#if defined(HAVE_GCC_DIAGNOSTIC_PUSH) && __STDC_VERSION__ < 202311L +#pragma GCC diagnostic pop +#endif + /* clang-format off */ /** * Output variants of WKB we support.