Re: cpluspluscheck complains about use of register

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: cpluspluscheck complains about use of register
Date: 2022-03-08 18:46:36
Message-ID: 405393.1646765196@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> When running cpluspluscheck I get many many complaints like
> /tmp/pg-test-repo/src/include/port/atomics/arch-x86.h:143:23: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]

Interesting, I don't see that here.

> It seems we should just remove the use of register?

I have a vague idea that it was once important to say "register" if
you are going to use the variable in an asm snippet that requires it
to be in a register. That might be wrong, or it might be obsolete
even if once true. We could try taking these out and seeing if the
buildfarm complains. (If so, maybe -Wno-register would help?)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-03-08 18:49:15 Re: Time to drop plpython2?
Previous Message Andres Freund 2022-03-08 18:42:31 Re: Time to drop plpython2?