While testing a buildfarm module to automate running headerscheck and cpluspluscheck, I encountered a bunch of errors like this:
Jan 12 09:35:57 In file included from /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/port/atomics.h:70, Jan 12 09:35:57 from /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/storage/lwlock.h:21, Jan 12 09:35:57 from /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/storage/lock.h:23, Jan 12 09:35:57 from /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/storage/proc.h:21, Jan 12 09:35:57 from /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/storage/shm_mq.h:18, Jan 12 09:35:57 from /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/libpq/pqmq.h:17, Jan 12 09:35:57 from /tmp/cpluspluscheck.16q7jo/test.cpp:3: Jan 12 09:35:57 /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/port/atomics/arch-x86.h: In function ‘bool pg_atomic_test_set_flag_impl(volatile pg_atomic_flag*)’: Jan 12 09:35:57 /home/andrew/bf/root/HEAD/pgsql.build/../pgsql/src/include/port/atomics/arch-x86.h:143:23: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] Jan 12 09:35:57 143 | register char _res = 1; Jan 12 09:35:57 | ^~~~ there are similar complaints about s_lock.h. The compiler is: g++ (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1) Do we need to add -Wnoregister to the CXXFLAGS? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com