Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32027 )
Change subject: Make common macros double-evaluation safe
......................................................................
Patch Set 11:
I won't expect you to resolve the ABS(INT_MIN) == INT_MIN despite INT_MIN < 0 issue ;-)
I mean... it should be easy enough to check for if you want to?
if (_abs_local_a == (~(~(__typeof__(a))0) >> 1))
die(...);
The problem is that you can't do 'unsigned __typeof__(a)' so I don't think you could ever write this in a way that returns a valid result for that case (unless we just always make abs() return uint64_t). Also it's probably not enough of a problem to warrant the extra code size.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/32027
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iea35156c9aa9f6f2c7b8f00991418b746f44315d
Gerrit-Change-Number: 32027
Gerrit-PatchSet: 11
Gerrit-Owner: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Aaron Durbin
adurbin@chromium.org
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Comment-Date: Thu, 04 Apr 2019 19:57:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment