osmo-pcu[master]: RFC: remove this == NULL checks

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Wed Jun 1 14:53:38 UTC 2016


Patch Set 1:

> all checks of (this == null) will be eliminated by GCC >= 6.1
 > (https://gcc.gnu.org/gcc-6/changes.html, Value range propagation
 > now assumes that the this pointer of C++ member functions is
 > non-null. This eliminates common null pointer checks but also
 > breaks some non-conforming code-bases (such as Qt-5, Chromium,
 > KDevelop). As a temporary work-around -fno-delete-null-pointer-checks
 > can be used. Wrong code can be identified by using
 > -fsanitize=undefined.)
 > 
 > But given the "make check" failure we seem to expect that. You will
 > need to move the null check before calling the function or create a
 > method wrapper where the tbf pointer is passed so we can do the
 > null check there.

thanks for the explanation.
this is also the reason, why make check fails on my laptop. 
gcc --version
gcc (GCC) 6.1.1 20160501

-- 
To view, visit https://gerrit.osmocom.org/136
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifddaef70bb0a4402050c817b1000d515c3a7118b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-HasComments: No



More information about the OpenBSC mailing list