lex_char_uchar.c revision 1.4
11.4Srillig/*	$NetBSD: lex_char_uchar.c,v 1.4 2021/08/21 11:50:57 rillig Exp $	*/
21.1Srillig# 3 "lex_char_uchar.c"
31.1Srillig
41.1Srillig/*
51.1Srillig * Test lexical analysis of character constants on platforms where plain
61.1Srillig * char has the same representation as unsigned char.
71.1Srillig */
81.1Srillig
91.4Srillig/* lint1-only-if: uchar */
101.1Srillig
111.1Srillig/*
121.3Srillig * Before inittyp.c 1.23 from 2021-06-29, the following initialization
131.3Srillig * triggered a wrong warning "conversion of 'int' to 'char' is out of range",
141.3Srillig * but only on platforms where char has the same representation as unsigned
151.3Srillig * char.  There are only few of these platforms, which allowed this bug to
161.3Srillig * survive for almost 26 years, since the initial commit of lint on
171.3Srillig * 1995-07-03.
181.1Srillig */
191.1Srilligchar ch = '\xff';
20