gcc-12-20220604 is now available

2022-06-04 Thread GCC Administrator via Gcc
Snapshot gcc-12-20220604 is now available on https://gcc.gnu.org/pub/gcc/snapshots/12-20220604/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 12 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

Re: [RFC] Support for nonzero attribute

2022-06-04 Thread Yair Lenga via Gcc
Static checks will be a good starting point! On Sat, Jun 4, 2022 at 7:55 AM Miika wrote: > On Saturday, June 4th, 2022 at 1:26 PM, Yair Lenga via Gcc < > gcc@gcc.gnu.org> wrote: > > The specific non-zero constraint is a specific implementation of the > range > > operator (with some exception see

[RFC] Support for nonzero attribute

2022-06-04 Thread Miika via Gcc
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

[RFC] Support for nonzero attribute

2022-06-04 Thread Miika via Gcc
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

[RFC] Support for nonzero attribute

2022-06-04 Thread Yair Lenga via Gcc
Before becoming a "C" programmer, I spent few years building simulations in Pascal. I still remember (and long for) the ability to define integer with range constraints: var foobar: 10..50 ; // Accept 10, 11, 12, ..., 49, 50 The specific non-zero constraint is a specific implementation of