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 lexing of integer...
details: https://anonhg.NetBSD.org/src/rev/8f26a1443d6e
branches: trunk
changeset: 984517:8f26a1443d6e
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jul 10 18:42:28 2021 +0000
description:
tests/lint: test lexing of integer suffixes
diffstat:
tests/usr.bin/xlint/lint1/lex_integer.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 3258f3b2cc14 -r 8f26a1443d6e tests/usr.bin/xlint/lint1/lex_integer.c
--- a/tests/usr.bin/xlint/lint1/lex_integer.c Sat Jul 10 18:34:03 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/lex_integer.c Sat Jul 10 18:42:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex_integer.c,v 1.4 2021/06/29 13:58:13 rillig Exp $ */
+/* $NetBSD: lex_integer.c,v 1.5 2021/07/10 18:42:28 rillig Exp $ */
# 3 "lex_integer.c"
/*
@@ -43,3 +43,19 @@
/* expect+1: conversion of 'unsigned long' to 'unsigned int' is out of range */
sinku(4294967296U);
}
+
+void sinkull(unsigned long long);
+
+void
+suffixes(void)
+{
+ sinkull(3u);
+ sinkull(3ll);
+ sinkull(3llu);
+ sinkull(3Ull);
+
+ /* The 'LL' must not be split. Checked by the compiler. */
+ sinkull(3lul);
+ /* The 'Ll' must not used mixed case. Checked by the compiler. */
+ sinkull(3ULl);
+}
Home |
Main Index |
Thread Index |
Old Index