EXEC SQL BEGIN DECLARE SECTION; static const char TEST[2] = "F"; EXEC SQL END DECLARE SECTION;
On Tue, Mar 23, 2021 at 11:36 PM Matthias Apitz <guru@unixarea.de> wrote:
El día martes, marzo 23, 2021 a las 04:07:01p. m. +0000, PG Bug reporting form escribió:
> The following bug has been logged on the website: > > Bug reference: 16941 > Logged by: Bryan Staley > Email address: bryan.w.staley@gmail.com > PostgreSQL version: 13.1 > Operating system: RHEL 7 > Description: > > The following doesn't compile via ecpg > > ``` > EXEC SQL BEGIN DECLARE SECTION; > static const char[2] TEST = "F"; > EXEC SQL END DECLARE SECTION; > ``` > > Fails with > error: invalid conversion from 'const void*' to 'void*' >
This would not even compile:
$ cc -v FreeBSD clang version 11.0.0 (git@github.com:llvm/llvm-project.git llvmorg-11.0.0-0-g176249bd673) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin
$ cat c.c
static const char[2] TEST = "F";
$ cc c.c c.c:2:26: error: brackets are not allowed here; to declare an array, place the brackets after the identifier static const char[2] TEST = "F"; ~~~ ^ [2] 1 error generated.