Thank you for the feedback!
On Sunday, June 12th, 2022 at 7:25 AM, Prathamesh Kulkarni
wrote:
> On Mon, 6 Jun 2022 at 01:39, Miika via Gcc gcc@gcc.gnu.org wrote:
>
> > Based on Jakub's and Yair's comments I created a new attribute "inrange".
> > Inrage
On Thursday, June 9th, 2022 at 7:36 AM, Eric Gallager
wrote:
> Nice, good to hear! I'm looking forward to seeing this get added!
I'll write some tests and try to send the patches next week!
Miika
On Wednesday, June 8th, 2022 at 8:42 PM, Eric Gallager
wrote:
> Could you take a look at bug 78155 too? There was a request to add
> something like this in that bug:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78155
> (and I think I've seen similar requests elsewhere, too)
I took a look at th
On Tuesday, June 7th, 2022 at 10:46 PM, Jonathan Wakely
wrote:
> On Tue, 7 Jun 2022 at 20:44, Jonathan Wakely wrote:
>
> > On Tue, 7 Jun 2022 at 20:40, Miika via Gcc gcc@gcc.gnu.org wrote:
> >
> > > On Monday, June 6th, 2022 at 9:42 PM, Ben Boeckel ben.boec.
On Monday, June 6th, 2022 at 9:42 PM, Ben Boeckel
wrote:
> > Based on Jakub's and Yair's comments I created a new attribute "inrange".
> > Inrage takes three arguments, pos min and max.
> > Pos being the argument position in the function, and min and max defines the
> > range of valid integer. Bo
Based on Jakub's and Yair's comments I created a new attribute "inrange".
Inrage takes three arguments, pos min and max.
Pos being the argument position in the function, and min and max defines the
range of valid integer. Both min and max are inclusive and work with enums.
Warnings are enabled with
On Saturday, June 4th, 2022 at 1:26 PM, Yair Lenga via Gcc
wrote:
> The specific non-zero constraint is a specific implementation of the range
> operator (with some exception see below). Wanted to suggest going for
> more ambitious goal: add min and max attributes to (integer) types and
> variabl
Thank you for the feedback!
On Friday, June 3rd, 2022 at 7:45 PM, Jakub Jelinek wrote:
> For some functions, 0 could be a value it wants to avoid, for others
> such value could be -1, negative value, positive, whatever else...
> IMHO if we want to add anything like this, it should be more generic
Hello,
I would like to add support for new attribute: nonzero.
Nonzero attribute works the same way as nonnull but instead of checking for
NULL, it checks for integer or enum with value 0.
Nonzero attribute would issue warnings with new compiler flag
-Wnonzero and -Wnonzero-compare.
Nonzero coul