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