Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: test parsing of octal ...
details: https://anonhg.NetBSD.org/src/rev/cea477443aa7
branches: trunk
changeset: 985511:cea477443aa7
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Aug 28 21:01:34 2021 +0000
description:
tests/lint: test parsing of octal integer constants
diffstat:
tests/usr.bin/xlint/lint1/lex_integer.c | 9 +++-
tests/usr.bin/xlint/lint1/lex_integer.exp | 64 +++++++++++++++---------------
2 files changed, 40 insertions(+), 33 deletions(-)
diffs (104 lines):
diff -r 546188844a9f -r cea477443aa7 tests/usr.bin/xlint/lint1/lex_integer.c
--- a/tests/usr.bin/xlint/lint1/lex_integer.c Sat Aug 28 20:51:10 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/lex_integer.c Sat Aug 28 21:01:34 2021 +0000
@@ -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 @@
{
/* 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' */
diff -r 546188844a9f -r cea477443aa7 tests/usr.bin/xlint/lint1/lex_integer.exp
--- a/tests/usr.bin/xlint/lint1/lex_integer.exp Sat Aug 28 20:51:10 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/lex_integer.exp Sat Aug 28 21:01:34 2021 +0000
@@ -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]
Home |
Main Index |
Thread Index |
Old Index