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