Module Name:    src
Committed By:   rillig
Date:           Sat Aug 28 21:01:34 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: lex_integer.c lex_integer.exp

Log Message:
tests/lint: test parsing of octal integer constants


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/lex_integer.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/lex_integer.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/xlint/lint1/lex_integer.c
diff -u src/tests/usr.bin/xlint/lint1/lex_integer.c:1.8 src/tests/usr.bin/xlint/lint1/lex_integer.c:1.9
--- src/tests/usr.bin/xlint/lint1/lex_integer.c:1.8	Sat Aug 28 20:51:10 2021
+++ src/tests/usr.bin/xlint/lint1/lex_integer.c	Sat Aug 28 21:01:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex_integer.c,v 1.8 2021/08/28 20:51:10 rillig Exp $	*/
+/*	$NetBSD: lex_integer.c,v 1.9 2021/08/28 21:01:34 rillig Exp $	*/
 # 3 "lex_integer.c"
 
 /*
@@ -26,17 +26,22 @@ no_suffix(void)
 {
 	/* expect+1: passing 'int' */
 	print_type(0);
-	/* The '-' is not part of the constant, it's a unary operator. */
+	/* The '-' is not part of the constant, it is a unary operator. */
 	/* expect+1: passing 'int' */
 	print_type(-1);
+
 	/* expect+1: passing 'int' */
 	print_type(2147483647);
 	/* expect+1: passing 'int' */
 	print_type(0x7fffffff);
+	/* expect+1: passing 'int' */
+	print_type(017777777777);
 
 	/* expect+1: passing 'unsigned int' */
 	print_type(0x80000000);
 	/* expect+1: passing 'unsigned int' */
+	print_type(020000000000);
+	/* expect+1: passing 'unsigned int' */
 	print_type(0xffffffff);
 
 	/* expect+1: passing 'long' */

Index: src/tests/usr.bin/xlint/lint1/lex_integer.exp
diff -u src/tests/usr.bin/xlint/lint1/lex_integer.exp:1.3 src/tests/usr.bin/xlint/lint1/lex_integer.exp:1.4
--- src/tests/usr.bin/xlint/lint1/lex_integer.exp:1.3	Sat Aug 28 20:51:10 2021
+++ src/tests/usr.bin/xlint/lint1/lex_integer.exp	Sat Aug 28 21:01:34 2021
@@ -1,34 +1,36 @@
 lex_integer.c(28): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
 lex_integer.c(31): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(33): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(35): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(38): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(40): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(43): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(45): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(47): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(50): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(52): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(56): warning: integer constant out of range [252]
-lex_integer.c(56): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(63): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(65): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(34): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(36): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(38): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(41): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(43): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(45): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(48): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(50): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(52): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(55): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(57): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(61): warning: integer constant out of range [252]
+lex_integer.c(61): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
 lex_integer.c(68): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(70): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(77): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(80): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(87): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(89): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(96): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(100): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(103): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(110): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(112): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(116): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(120): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(128): warning: malformed integer constant [251]
-lex_integer.c(128): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(132): warning: malformed integer constant [251]
-lex_integer.c(132): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(141): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
-lex_integer.c(144): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(70): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(73): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(75): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(82): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(85): warning: passing 'long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(92): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(94): warning: passing 'unsigned long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(101): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(105): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(108): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(115): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(117): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(121): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(125): warning: passing 'unsigned long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(133): warning: malformed integer constant [251]
+lex_integer.c(133): warning: passing 'long long' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(137): warning: malformed integer constant [251]
+lex_integer.c(137): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(146): warning: passing 'int' to incompatible 'struct s', arg #1 [155]
+lex_integer.c(149): warning: passing 'unsigned int' to incompatible 'struct s', arg #1 [155]

Reply via email to