On Wed, Jun 8, 2022 at 5:00 PM Miika <nyks...@protonmail.com> wrote: > > On Wednesday, June 8th, 2022 at 8:42 PM, Eric Gallager <eg...@gwmail.gwu.edu> > 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 the bug and looks like the inrange attribute can be applied > to > builtin functions too. > > So now the example code > int main (void) > { > __builtin_printf ("%i\n", __builtin_isalpha (999999)); > } > > Now gives the following error: > > foo.c: In function 'main': > foo.c:3:31: warning: argument in position 1 not in rage of 0..255 [-Winrange] > 3 | __builtin_printf ("%i\n", __builtin_isalpha (999999)); > | > > Miika
Nice, good to hear! I'm looking forward to seeing this get added! Thanks, Eric