1 /* $NetBSD: platform_int.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ 2 # 3 "platform_int.c" 3 4 /* 5 * Test features that only apply to platforms on which size_t is unsigned 6 * int and ptr_diff is signed int. 7 */ 8 9 /* lint1-only-if: int */ 10 /* lint1-flags: -g -w -c -h -a -p -b -r -z -X 351 */ 11 12 void to_size(typeof(sizeof(int))); 13 14 /* See should_warn_about_prototype_conversion. */ 15 void 16 convert_unsigned_char_to_size(unsigned char uc) 17 { 18 /* 19 * In this function call, uc is first promoted to INT. It is then 20 * converted to size_t, which is UINT. The portable bit size of INT 21 * and UINT is the same, 32, but the signedness changes, therefore 22 * the warning. 23 */ 24 /* expect+1: warning: argument #1 is converted from 'unsigned char' to 'unsigned int' due to prototype [259] */ 25 to_size(uc); 26 } 27