On Wed, Oct 28, 2026 at 9:41 AM Alexander Monakov <[email protected]> wrote: > > > On Wed, 28 Oct 2026, Alexander Monakov wrote: > > > > +bool > > > +parse_tls_model (const_tree id, enum tls_model *kind) > > > +{ > > > + if (TREE_CODE (id) != STRING_CST) > > > + return false; > > > > I think this needs to be > > > > gcc_checking_assert (TREE_CODE (id) == STRING_CST); > > > > to properly catch misuse. The defensive 'if' looks like an anti-pattern for > > GCC. > > Ah, below that you have TREE_STRING_POINTER, which already embeds a test for > TREE_CODE(id) == STRING_CST (via STRING_CST_CHECK). So if the defensive 'if' > is not necessary for anything, it can be simply deleted. > > Alexander
Good catch, thanks. I'll send a v3.
