Re: [PATCH] warning option for traps (-Wtrap)

2024-10-15 Thread Martin Uecker
Am Dienstag, dem 15.10.2024 um 12:15 +0200 schrieb Jakub Jelinek: > On Tue, Oct 15, 2024 at 11:50:21AM +0200, Richard Biener wrote: > > > Would it be reasonable to approve this patch now and I try > > > to improve this later? > > > > On the patch itself: > > > > void > > expand_builtin_trap (vo

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-15 Thread Jakub Jelinek
On Tue, Oct 15, 2024 at 11:50:21AM +0200, Richard Biener wrote: > > Would it be reasonable to approve this patch now and I try > > to improve this later? > > On the patch itself: > > void > expand_builtin_trap (void) > { > + if (warn_trap) > +{ > + location_t current_location = Form

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-15 Thread Richard Biener
On Sun, 13 Oct 2024, Martin Uecker wrote: > Am Sonntag, dem 13.10.2024 um 10:56 +0200 schrieb Richard Biener: > > On Sat, 12 Oct 2024, Martin Uecker wrote: > > > > > Am Samstag, dem 12.10.2024 um 18:44 +0200 schrieb Richard Biener: > > > > > > > > > Am 12.10.2024 um 16:43 schrieb Martin Uecker :

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-13 Thread Martin Uecker
Am Sonntag, dem 13.10.2024 um 10:56 +0200 schrieb Richard Biener: > On Sat, 12 Oct 2024, Martin Uecker wrote: > > > Am Samstag, dem 12.10.2024 um 18:44 +0200 schrieb Richard Biener: > > > > > > > Am 12.10.2024 um 16:43 schrieb Martin Uecker : > > > > > > > >  > > > > There is code which should

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-13 Thread Richard Biener
On Sat, 12 Oct 2024, Martin Uecker wrote: > Am Samstag, dem 12.10.2024 um 18:44 +0200 schrieb Richard Biener: > > > > > Am 12.10.2024 um 16:43 schrieb Martin Uecker : > > > > > >  > > > There is code which should not fail at run-time. For this, > > > it is helpful to get a warning when a compi

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-12 Thread Martin Uecker
Am Samstag, dem 12.10.2024 um 18:44 +0200 schrieb Richard Biener: > > > Am 12.10.2024 um 16:43 schrieb Martin Uecker : > > > >  > > There is code which should not fail at run-time. For this, > > it is helpful to get a warning when a compiler inserts traps > > (e.g. sanitizers, hardbools, __buil

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-12 Thread Richard Biener
> Am 12.10.2024 um 16:43 schrieb Martin Uecker : > >  > There is code which should not fail at run-time. For this, > it is helpful to get a warning when a compiler inserts traps > (e.g. sanitizers, hardbools, __builtin_trap(), etc.). > > Having a warning for this also has many other use case

[PATCH] warning option for traps (-Wtrap)

2024-10-12 Thread Martin Uecker
There is code which should not fail at run-time. For this, it is helpful to get a warning when a compiler inserts traps (e.g. sanitizers, hardbools, __builtin_trap(), etc.). Having a warning for this also has many other use cases, e.g. one can use it with some sanitizer to rule out that some pi