Home | History | Annotate | Line # | Download | only in lint1
      1 /*	$NetBSD: platform_uchar.c,v 1.6 2025/04/07 16:06:18 rillig Exp $	*/
      2 # 3 "platform_uchar.c"
      3 
      4 /*
      5  * Test features that only apply to platforms where plain char has the same
      6  * representation as unsigned char.
      7  */
      8 
      9 /* lint1-extra-flags: -c -h -a -p -b -r -z -X 351 */
     10 /* lint1-only-if: uchar */
     11 
     12 /* expect+1: warning: nonportable character comparison '< 128' [230] */
     13 typedef int char_char[(char)'\177' < (char)'\200' ? 1 : -1];
     14 /* expect+1: warning: nonportable character comparison '< 128' [230] */
     15 typedef int int_char[(char)127 < (char)'\200' ? 1 : -1];
     16 /* expect+1: warning: nonportable character comparison '< 128' [230] */
     17 typedef int char_int[(char)'\177' < (char)128 ? 1 : -1];
     18 /* expect+1: warning: nonportable character comparison '< 128' [230] */
     19 typedef int int_int[(char)127 < (char)128 ? 1 : -1];
     20 
     21 
     22 void
     23 first_to_upper(char *p)
     24 {
     25 	/* expect+1: warning: conversion of negative constant -32 to unsigned type 'char' [222] */
     26 	*p += 'A' - 'a';
     27 }
     28