Namespaces
Variants
Actions

Talk:c/language/integer constant

From cppreference.com

gcc -Wformat -Wsignedness gives a warning for the last line of the example

Run this code
printf ("%lld\n", -9223372036854775807ull - 1);

Output:

integer_constant.c:21:16: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long long unsigned int’ [-Wformat=]

Would it not be more accurate to use -9223372036854775807ll instead of -9223372036854775807ull?

Rsarson (talk) 09:05, 7 May 2023 (PDT)

agree, adjusted --Cubbi (talk) 08:03, 8 May 2023 (PDT)
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=Talk:c/language/integer_constant&oldid=151482"

AltStyle によって変換されたページ (->オリジナル) /