Re: sys/cdefs.h: fix __predict_false fallback implementation

2020-02-11 Thread Jeremie Courreges-Anglas
On Tue, Feb 11 2020, "Todd C. Miller" wrote: > On Tue, 11 Feb 2020 21:44:21 +, Nicholas Marriott wrote: > >> Looks like the existing code is OK, you still want to test the original >> expression even if you are predicting it is false, no? > > Right, the code is correct as written. Woops,

Re: sys/cdefs.h: fix __predict_false fallback implementation

2020-02-11 Thread Todd C . Miller
On Tue, 11 Feb 2020 21:44:21 +, Nicholas Marriott wrote: > Looks like the existing code is OK, you still want to test the original > expression even if you are predicting it is false, no? Right, the code is correct as written. - todd

Re: sys/cdefs.h: fix __predict_false fallback implementation

2020-02-11 Thread Nicholas Marriott
Looks like the existing code is OK, you still want to test the original expression even if you are predicting it is false, no? On Tue, Feb 11, 2020 at 07:33:19PM +0100, Jeremie Courreges-Anglas wrote: > > Found while looking at __ISO_C_VISIBLE. I'm not sure which compilers > would be

sys/cdefs.h: fix __predict_false fallback implementation

2020-02-11 Thread Jeremie Courreges-Anglas
Found while looking at __ISO_C_VISIBLE. I'm not sure which compilers would be affected. The fallback could simply be #define __predict_true(exp)(exp) #define __predict_false(exp) (exp) but I settled for a minimal change. ok? Index: cdefs.h