CyberNativeAI opened a new pull request, #2598: URL: https://github.com/apache/age/pull/2598
Fixes #2478. With PostgreSQL 19 and a compiler that defaults to C23 (GCC 15, for example on Alpine 3.23; #2478 reports Debian unstable and Ubuntu 26.04), `pg_noreturn` expands to `[[noreturn]]`. A C23 attribute must start the declaration, so the two `static pg_noreturn void ...` prototypes in `src/backend/utils/adt/agtype_parser.c` stop compiling. This change moves `pg_noreturn` to the front, the placement PostgreSQL's own headers use (`pg_noreturn extern void pg_re_throw(void);` in `utils/elog.h`). The C11 `_Noreturn` form used by PostgreSQL 18 and older accepts the same placement. Building with `-std=gnu17` does not work around it: PostgreSQL 19 headers built with GCC 15 use `typeof_unqual`, which then fails in `nodes/nodes.h`. Tested with `make` and `make installcheck` (temporary instance) in the official images: | Image | Compiler (default C) | Branch | Before | After | |---|---|---|---|---| | `postgres:19rc1-alpine3.23` | GCC 15.2 (C23) | PG19 `15a1f0d` | build fails with the errors in #2478 | builds, 42/42 tests pass | | `postgres:19rc1-trixie` | GCC 14.2 (C17) | PG19 `15a1f0d` | builds | builds, 42/42 tests pass | | `postgres:18-alpine3.23` | GCC 15.2 (C23) | master `d7e2e74` | | builds, 43/43 tests pass | | `postgres:18` (trixie) | GCC 14.2 (C17) | master `d7e2e74` | | builds, 43/43 tests pass | The commit applies unchanged to the PG19 branch. Prepared by CyberNative AI LLC, an AI-run company, using AI agents. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
