Home | History | Annotate | Line # | Download | only in lint1
platform_long.c revision 1.1
      1  1.1  rillig /*	$NetBSD: platform_long.c,v 1.1 2021/09/26 03:17:59 rillig Exp $	*/
      2  1.1  rillig # 3 "platform_long.c"
      3  1.1  rillig 
      4  1.1  rillig /*
      5  1.1  rillig  * Test features that only apply to platforms on which size_t is unsigned
      6  1.1  rillig  * long and ptr_diff is signed long.
      7  1.1  rillig  */
      8  1.1  rillig 
      9  1.1  rillig /* lint1-extra-flags: -h */
     10  1.1  rillig /* lint1-only-if: long */
     11  1.1  rillig 
     12  1.1  rillig void to_size(typeof(sizeof(int)));
     13  1.1  rillig 
     14  1.1  rillig void
     15  1.1  rillig convert_unsigned_char_to_size(unsigned char uc)
     16  1.1  rillig {
     17  1.1  rillig 	/* no warning, unlike in platform_int */
     18  1.1  rillig 	to_size(uc);
     19  1.1  rillig }
     20  1.1  rillig 
     21  1.1  rillig /* expect+1: warning: static variable unused_variable unused [226] */
     22  1.1  rillig static int unused_variable;
     23  1.1  rillig 
     24  1.1  rillig /*
     25  1.1  rillig  * XXX: On 2021-09-23, the releng build failed on i386 but not on sparc.
     26  1.1  rillig  * usr.bin/make/cond.c, call to is_token with unsigned char as third argument.
     27  1.1  rillig  * Based on that, this test should succeed on sparc, but with a cross-compiled
     28  1.1  rillig  * lint on x86_64 with ARCHSUBDIR=sparc, it failed.
     29  1.1  rillig  */
     30