Module Name:    src
Committed By:   rillig
Date:           Sat Jul 10 18:42:28 UTC 2021

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

Log Message:
tests/lint: test lexing of integer suffixes


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

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.4 src/tests/usr.bin/xlint/lint1/lex_integer.c:1.5
--- src/tests/usr.bin/xlint/lint1/lex_integer.c:1.4	Tue Jun 29 13:58:13 2021
+++ src/tests/usr.bin/xlint/lint1/lex_integer.c	Sat Jul 10 18:42:28 2021
@@ -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 @@ test_unsigned_int(void)
 	/* 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);
+}

Reply via email to