msg_077.c revision 1.7 1 /* $NetBSD: msg_077.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
2 # 3 "msg_077.c"
3
4 /* Test for message: bad octal digit %c [77] */
5
6 /* lint1-flags: -tw -X 351 */
7
8 /* expect+1: warning: bad octal digit 8 [77] */
9 char single_digit = '\8';
10
11 /*
12 * Before lex.c 1.47 from 2021-06-29, lint intended to detect a "bad octal
13 * digit" following good octal digits, but the corresponding code had an
14 * unsatisfiable guard clause.
15 *
16 * The C Reference Manual 1978, 2.4.3 "Character constants" does not mention
17 * non-octal digits, therefore this code must have been due to a particular
18 * C compiler's interpretation. It's even wrong according to the Reference
19 * Manual to interpret '\088' as anything else than a malformed character
20 * literal.
21 *
22 * That code has been removed since nobody runs lint in traditional C mode
23 * anyway.
24 * https://mail-index.netbsd.org/tech-toolchain/2021/03/16/msg003933.html
25 */
26 /* expect+1: warning: multi-character character constant [294] */
27 char several_digits = '\08';
28