lex_char_uchar.c revision 1.5
1/*	$NetBSD: lex_char_uchar.c,v 1.5 2023/03/28 14:44:34 rillig Exp $	*/
2# 3 "lex_char_uchar.c"
3
4/*
5 * Test lexical analysis of character constants on platforms where plain
6 * char has the same representation as unsigned char.
7 */
8
9/* lint1-only-if: uchar */
10/* lint1-extra-flags: -X 351 */
11
12/*
13 * Before inittyp.c 1.23 from 2021-06-29, the following initialization
14 * triggered a wrong warning "conversion of 'int' to 'char' is out of range",
15 * but only on platforms where char has the same representation as unsigned
16 * char.  There are only few of these platforms, which allowed this bug to
17 * survive for almost 26 years, since the initial commit of lint on
18 * 1995-07-03.
19 */
20char ch = '\xff';
21