On Sun 2026-05-03 08:59:10, Jeffrey Law wrote:
> 
> 
> On 4/29/2026 12:16 AM, Richard Biener wrote:
> > > The primary difference is we've found #ifdef style code tends to create 
> > > long
> > > term headaches.  You end up with conditionally compiled code and it's too 
> > > easy
> > > to make mistakes and end up with unused variables in some contexts and 
> > > other
> > > problems.   So we've generally been moving towards either runtime checks.
> > > 
> > > I would tend say see this case as fairly minor, but it's a slippery slope 
> > > and
> > > I'm not keen to give back the progress we've made on this front over the 
> > > last
> > > decade or so.  So if we can make it a runtime test selection rather than
> > > #ifdefs, that would be preferred.
> > But it's for a compile-time (of GCC) decision (instrumenting GCC itself
> > with ASAN)?  So I'm a bit confused.
> True.  I was hoping we could find a way to make this behave more like how we
> handle -fchecking to make it a runtime selection rather than a compile-time
> selection. If  we can't, then so-be-it and Filip's patch is probably the
> only sensible path forward.
> 
> jeff

As per

> >> I'm not excited by new #ifdefs.  I don't guess we have any runtime way to
> >> check for asan being enabled?  Assuming the answer to that is no, we don't
> >> have a way to check that, then this is OK for gcc-17.

I've committed the patch.  Hopefully that's ok.  I really don't believe there
is a reasonable way to make this into a run-time check.

Cheers,
Filip Kastl

Reply via email to