Ciao,

Il 2022-03-13 00:06 Torbjörn Granlund ha scritto:
There is some sort of sick competition between certain compilers to have the most warnings for valid C. I don't think we should play their game,

Incidantally, arithmetic on unsigned types is well-defined. Unlike that
of signed types.

int
foo (int a, int b)
{
  return a + b - 1;
}

$ clank foo.c
warning: signed addition might overflow and yield undefined results
warning: signed subtraction might overflow and yield undefined results

:-D
You are right!

Ĝis,
m
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to