From 911c76abcdfe89770b252eb0d4eb621c0db00ad5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 6 Sep 2019 11:53:11 -0400 Subject: [PATCH] [null] Silence undefined-behavior complaints with too-small null bytes Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1577584 --- src/hb-null.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hb-null.hh b/src/hb-null.hh index d4578205e..8657db349 100644 --- a/src/hb-null.hh +++ b/src/hb-null.hh @@ -48,8 +48,14 @@ template struct _hb_null_size : hb_integral_constant {}; +#ifdef HB_TINY +/* Disabled unless tiny, to avoid undefined-behavior. + * Enabling it saves a couple hundred bytes only. + * To make https://bugzilla.mozilla.org/show_bug.cgi?id=810823 happy. + */ template struct _hb_null_size> : hb_integral_constant {}; +#endif template using hb_null_size = _hb_null_size;