Re: cpluspluscheck complains about use of register
| От | Christoph Berg |
|---|---|
| Тема | Re: cpluspluscheck complains about use of register |
| Дата | |
| Msg-id | Zcn65ThY5lHK--3Z@msg.df7cb.de обсуждение исходный текст |
| Ответ на | Re: cpluspluscheck complains about use of register (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: cpluspluscheck complains about use of register
|
| Список | pgsql-hackers |
Re: Tom Lane > > I hit this again while porting cplupluscheck to be invoked by meson as > > well. ISTM that we should just remove the uses of register. > > OK by me. > > > I tried to use -Wregister to keep us honest going forward, but unfortunately > > it only works with a C++ compiler... > > I think we only really care about stuff that cpluspluscheck would spot, > so I don't feel a need to mess with the standard compilation flags. This has started to hurt: postgresql-debversion (a Debian version number data type written in C++) failed to build against Postgresql <= 15 on Ubuntu's next LTS release (24.04): In file included from /usr/include/postgresql/15/server/port/atomics.h:70: /usr/include/postgresql/15/server/port/atomics/arch-x86.h:143:2: error: ISO C++17 does not allow 'register' storage classspecifier [-Wregister] 143 | register char _res = 1; I managed to work around it by putting `#define register` before including the PG headers. Should the removal of "register" be backported to support that better? Christoph
В списке pgsql-hackers по дате отправления: