karka228 wrote:

> I think this diagnostic should not be firing on `%x` format specifiers:

In the C-standard (7.21.6.1 The fprintf function) when reading about the 
o,u,x,X format specifiers it say "The unsigned int argument is converted to 
unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal notation (x 
or X) in the style dddd; the letters abcdef are used for x conversion and the 
letters ABCDEF for X conversion.". That's the reason why this diagnostic give a 
warning in this case. When this was implemented in clang we also said that we 
should follow the gcc behavior (as much as possible) as this warning have been 
available in gcc for a long time and gcc give a warning in this case.


https://github.com/llvm/llvm-project/pull/74440
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to