lex_char_uchar.c revision 1.5
11.5Srillig/*	$NetBSD: lex_char_uchar.c,v 1.5 2023/03/28 14:44:34 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.5Srillig/* lint1-extra-flags: -X 351 */
111.1Srillig
121.1Srillig/*
131.3Srillig * Before inittyp.c 1.23 from 2021-06-29, the following initialization
141.3Srillig * triggered a wrong warning "conversion of 'int' to 'char' is out of range",
151.3Srillig * but only on platforms where char has the same representation as unsigned
161.3Srillig * char.  There are only few of these platforms, which allowed this bug to
171.3Srillig * survive for almost 26 years, since the initial commit of lint on
181.3Srillig * 1995-07-03.
191.1Srillig */
201.1Srilligchar ch = '\xff';
21