Home | History | Annotate | Line # | Download | only in lint1
platform_ilp32_int.c revision 1.2
      1 /*	$NetBSD: platform_ilp32_int.c,v 1.2 2023/03/28 14:44:35 rillig Exp $	*/
      2 # 3 "platform_ilp32_int.c"
      3 
      4 /*
      5  * Test features that only apply to platforms that have 32-bit int, long and
      6  * pointer types and where size_t is unsigned int, not unsigned long.
      7  */
      8 
      9 /* lint1-only-if: ilp32 int */
     10 /* lint1-extra-flags: -c -h -a -p -b -r -z -X 351 */
     11 
     12 int s32;
     13 unsigned int u32;
     14 long sl32;
     15 unsigned long ul32;
     16 
     17 void
     18 convert_between_int_and_long(void)
     19 {
     20 	/*
     21 	 * No warning about possible loss of accuracy, as the types have the
     22 	 * same size, both in target platform mode as well as in portable
     23 	 * mode.
     24 	 */
     25 	s32 = sl32;
     26 	sl32 = s32;
     27 	u32 = ul32;
     28 	ul32 = u32;
     29 }
     30