Re: gcc 13 warnings - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: gcc 13 warnings
Date
Msg-id CAJ7c6TO_S54K9e0NUc=OEEp3HDt2C4SnkQ=CAdGEa-ztEJf=ow@mail.gmail.com
Whole thread Raw
In response to Re: gcc 13 warnings  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: gcc 13 warnings
List pgsql-hackers
Hi,

> I have committed the change of buildtype to debugoptimized.

There is still a warning previously reported by Melanie:

```
[1391/1944] Compiling C object src/pl/plpgsql/src/plpgsql.so.p/pl_exec.c.o
In file included from ../src/include/access/htup_details.h:22,
                 from ../src/pl/plpgsql/src/pl_exec.c:21:
In function ‘assign_simple_var’,
    inlined from ‘exec_set_found’ at ../src/pl/plpgsql/src/pl_exec.c:8382:2:
../src/include/varatt.h:230:36: warning: array subscript 0 is outside
array bounds of ‘char[0]’ [-Warray-bounds]
  230 |         (((varattrib_1b_e *) (PTR))->va_tag)
      |                                    ^
../src/include/varatt.h:94:12: note: in definition of macro ‘VARTAG_IS_EXPANDED’
   94 |         (((tag) & ~1) == VARTAG_EXPANDED_RO)
      |            ^~~
../src/include/varatt.h:284:57: note: in expansion of macro ‘VARTAG_1B_E’
  284 | #define VARTAG_EXTERNAL(PTR)                            VARTAG_1B_E(PTR)
      |                                                         ^~~~~~~~~~~
../src/include/varatt.h:301:57: note: in expansion of macro ‘VARTAG_EXTERNAL’
  301 |         (VARATT_IS_EXTERNAL(PTR) &&
!VARTAG_IS_EXPANDED(VARTAG_EXTERNAL(PTR)))
      |                                                         ^~~~~~~~~~~~~~~
../src/pl/plpgsql/src/pl_exec.c:8570:17: note: in expansion of macro
‘VARATT_IS_EXTERNAL_NON_EXPANDED’
 8570 |
VARATT_IS_EXTERNAL_NON_EXPANDED(DatumGetPointer(newvalue)))
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[1687/1944] Compiling C object
src/test/modules/test_dsa/test_dsa.so.p/test_dsa.c.o^C
ninja: build stopped: interrupted by user.
``

Displayed only for the release builds, e.g.:

```
git clean -dfx
meson setup --buildtype release -DPG_TEST_EXTRA="kerberos ldap ssl"
-Dldap=disabled -Dssl=openssl -Dcassert=true -Dtap_tests=enabled
-Dprefix=/home/eax/pginstall build
ninja -C build
```

Compiler version is:

```
gcc (Debian 12.2.0-14) 12.2.0
```

The overall environment is Raspberry Pi 5 with pretty much default
configuration - Raspbian etc.

How to fix it? Absolutely no idea :)

--
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Improving the latch handling between logical replication launcher and worker processes.
Next
From: Dilip Kumar
Date:
Subject: Re: Conflict Detection and Resolution