Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03bf971

Browse files
committed
Remove uses of register due to incompatibility with C++17 and up
The use in regexec.c could remain, since we only try to keep headers C++clean. But there really doesn't seem to be a good reason to use register inthat spot.Discussion:https://postgr.es/m/20220308185902.ibdqmasoaunzjrfc@alap3.anarazel.de
1 parenteef6394 commit03bf971

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

‎.cirrus.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,6 @@ task:
556556
# - Use -fmax-errors, as particularly cpluspluscheck can be very verbose
557557
# - XXX have to disable ICU to avoid errors:
558558
# https://postgr.es/m/20220323002024.f2g6tivduzrktgfa%40alap3.anarazel.de
559-
# - XXX: the -Wno-register avoids verbose warnings:
560-
# https://postgr.es/m/20220308181837.aun3tdtdvao4vb7o%40alap3.anarazel.de
561559
###
562560
always:
563561
headers_headerscheck_script:|
@@ -569,7 +567,7 @@ task:
569567
make -s -j${BUILD_JOBS} clean
570568
time make -s headerscheck EXTRAFLAGS='-fmax-errors=10'
571569
headers_cpluspluscheck_script:|
572-
time make -s cpluspluscheck EXTRAFLAGS='-Wno-register -fmax-errors=10'
570+
time make -s cpluspluscheck EXTRAFLAGS='-fmax-errors=10'
573571
574572
always:
575573
upload_caches:ccache

‎src/backend/regex/regexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pg_regexec(regex_t *re,
192192
intflags)
193193
{
194194
structvarsvar;
195-
registerstructvars*v=&var;
195+
structvars*v=&var;
196196
intst;
197197
size_tn;
198198
size_ti;

‎src/include/port/atomics/arch-x86.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pg_spin_delay_impl(void)
140140
staticinlinebool
141141
pg_atomic_test_set_flag_impl(volatilepg_atomic_flag*ptr)
142142
{
143-
registerchar_res=1;
143+
char_res=1;
144144

145145
__asm__ __volatile__(
146146
"lock\n"

‎src/include/storage/s_lock.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ typedef unsigned char slock_t;
142142
static __inline__int
143143
tas(volatileslock_t*lock)
144144
{
145-
registerslock_t_res=1;
145+
slock_t_res=1;
146146

147147
/*
148148
* Use a non-locking test before asserting the bus lock. Note that the
@@ -223,7 +223,7 @@ typedef unsigned char slock_t;
223223
static __inline__int
224224
tas(volatileslock_t*lock)
225225
{
226-
registerslock_t_res=1;
226+
slock_t_res=1;
227227

228228
__asm__ __volatile__(
229229
"lock\n"
@@ -356,7 +356,7 @@ typedef unsigned char slock_t;
356356
static __inline__int
357357
tas(volatileslock_t*lock)
358358
{
359-
registerslock_t_res;
359+
slock_t_res;
360360

361361
/*
362362
*See comment in src/backend/port/tas/sunstudio_sparc.s for why this
@@ -511,9 +511,9 @@ typedef unsigned int slock_t;
511511
static __inline__int
512512
tas(volatileslock_t*lock)
513513
{
514-
registervolatileslock_t*_l=lock;
515-
registerint_res;
516-
registerint_tmp;
514+
volatileslock_t*_l=lock;
515+
int_res;
516+
int_tmp;
517517

518518
__asm__ __volatile__(
519519
" .set push \n"
@@ -574,7 +574,7 @@ static __inline__ int
574574
tas(volatileslock_t*lock)
575575
{
576576
volatileint*lockword=TAS_ACTIVE_WORD(lock);
577-
registerintlockval;
577+
intlockval;
578578

579579
/*
580580
* The LDCWX instruction atomically clears the target word and

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp