Thread (42 messages) flat view 42 messages, 7 authors, 5d ago

Re: [PATCH v2 1/7] banned-die: create header for banning of functions

From: Derrick Stolee <hidden>
Date: 2026-08-31 12:29:54

On 8/25/2026 6:14 PM, Elijah Newren wrote:
On Tue, Aug 25, 2026 at 11:58 AM Derrick Stolee via GitGitGadget
[off-list ref] wrote:
quoted
[...]
quoted
+#undef die
+#define die banned(die)
Shouldn't that be BANNED(die) to match all the other cases in the code
(and avoid an obtuse "implicit declaration of function 'banned'"
instead of the nicer "sorry_die_is_a_banned_function" message)?
Oops. Yes, a mistake during a rebase. 
quoted
+
+#endif /* BANNED_DIE_H */
diff --git a/trace2.c b/trace2.c
index c23c0a227b..1d0ed2db2b 100644
--- a/trace2.c
+++ b/trace2.c
@@ -17,6 +17,7 @@
 #include "trace2/tr2_tgt.h"
 #include "trace2/tr2_tls.h"
 #include "trace2/tr2_tmr.h"
+#include "banned-die.h"
Is there a risk that future folks add new includes at the end of the
list, then functions in them get added to banned-die.h, but are
silently ignored because banned-die.h wasn't the last include?
There is a risk. The "must be last" part is documented in the
header, but maybe it should be in a comment here, too.

Thanks,
-Stolee
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help