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