# HG changeset patch # User Paul Boddie # Date 1530546795 -7200 # Node ID 1b1c1664e7749321fc00bf1e5153730145894c18 # Parent e9780223ee2f5c82c7377400b8b7f8cd124d9c7d Employ an explicit temporary variable for the object reference in __BOOL. diff -r e9780223ee2f -r 1b1c1664e774 templates/progops.c --- a/templates/progops.c Mon Jun 25 14:27:00 2018 +0200 +++ b/templates/progops.c Mon Jul 02 17:53:15 2018 +0200 @@ -1,6 +1,6 @@ /* Operations depending on program specifics. -Copyright (C) 2015, 2016, 2017 Paul Boddie +Copyright (C) 2015, 2016, 2017, 2018 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -301,7 +301,9 @@ { /* Invoke the bool function with the object and test against True. */ - return __VALUE(attr) == &__predefined___builtins___boolean_True ? 1 : - __VALUE(attr) == &__predefined___builtins___boolean_False ? 0 : + __ref value = __VALUE(attr); + + return value == &__predefined___builtins___boolean_True ? 1 : + value == &__predefined___builtins___boolean_False ? 0 : __VALUE(__fn___builtins___boolean_bool(__NULL, attr)) == &__predefined___builtins___boolean_True; }