[newlib-cygwin/main] Cygwin: Use bool return type for comparison operators in class pinfo
Jon Turney via Cygwin-cvs <[email protected]> Tue, 30 Jun 2026 18:13:15 +0000 (GMT)
| Newsgroups | gmane.os.cygwin.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D1337916e9b0= 3d04dadbe35adf8cf051d24ba30c2 commit 1337916e9b03d04dadbe35adf8cf051d24ba30c2 Author: Jon Turney <[email protected]> Date: Tue May 26 09:57:58 2026 +0100 Cygwin: Use bool return type for comparison operators in class pinfo =20 Fixes errors when compiling with gcc 16: =20 > ../../../../src/winsup/cygwin/signal.cc: In function =E2=80=98int kil= l_pgrp(pid_t, siginfo_t&)=E2=80=99: > ../../../../src/winsup/cygwin/signal.cc:373:13: error: return type of= =E2=80=98int pinfo::operator=3D=3D(_pinfo*) const=E2=80=99 is not =E2=80= =98bool=E2=80=99 > ../../../../src/winsup/cygwin/signal.cc:373:13: note: used as rewritt= en candidate for comparison of =E2=80=98_pinfo*=E2=80=99 and =E2=80=98pinfo= =E2=80=99 > and so on =20 Signed-off-by: Jon Turney <[email protected]> Diff: --- winsup/cygwin/local_includes/pinfo.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/local_includes/pinfo.h b/winsup/cygwin/local_inc= ludes/pinfo.h index 6f817de6b..fe8203fbc 100644 --- a/winsup/cygwin/local_includes/pinfo.h +++ b/winsup/cygwin/local_includes/pinfo.h @@ -227,10 +227,10 @@ public: void maybe_set_exit_code_from_windows (); void set_exit_code (DWORD n); _pinfo *operator -> () const {return procinfo;} - int operator =3D=3D (pinfo *x) const {return x->procinfo =3D=3D procinfo= ;} - int operator =3D=3D (pinfo &x) const {return x.procinfo =3D=3D procinfo;} - int operator =3D=3D (_pinfo *x) const {return x =3D=3D procinfo;} - int operator =3D=3D (void *x) const {return procinfo =3D=3D x;} + bool operator =3D=3D (pinfo *x) const {return x->procinfo =3D=3D procinf= o;} + bool operator =3D=3D (pinfo &x) const {return x.procinfo =3D=3D procinfo= ;} + bool operator =3D=3D (_pinfo *x) const {return x =3D=3D procinfo;} + bool operator =3D=3D (void *x) const {return procinfo =3D=3D x;} _pinfo *operator * () const {return procinfo;} operator _pinfo * () const {return procinfo;} int operator !() const {return !procinfo;}