1 /* $NetBSD: msg_132_lp64.c,v 1.3 2025/01/03 01:27:35 rillig Exp $ */ 2 # 3 "msg_132_lp64.c" 3 4 // Test for message: conversion from '%s' to '%s' may lose accuracy [132] 5 6 /* lint1-extra-flags: -a -X 351 */ 7 /* lint1-only-if: lp64 */ 8 9 typedef unsigned int u32_t; 10 11 u32_t u32; 12 const char *ptr; 13 14 unsigned int 15 convert_pointer_to_smaller_integer(void) 16 { 17 /* expect+1: warning: conversion from 'unsigned long' to 'unsigned int' may lose accuracy [132] */ 18 return (unsigned long)(ptr) >> 12; 19 } 20 21 void 22 test_ic_minus(void) 23 { 24 /* expect+1: warning: conversion from 'long' to 'unsigned int' may lose accuracy [132] */ 25 u32 = ptr + 3 - ptr; 26 } 27