Module Name:    src
Committed By:   rillig
Date:           Thu Aug  5 06:45:37 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint2: read.c

Log Message:
lint: fix handling of __int128_t/__uint128_t in lint2

Previously, lint exited with "bad type: J u".


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/xlint/lint2/read.c

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

Modified files:

Index: src/usr.bin/xlint/lint2/read.c
diff -u src/usr.bin/xlint/lint2/read.c:1.46 src/usr.bin/xlint/lint2/read.c:1.47
--- src/usr.bin/xlint/lint2/read.c:1.46	Sat Jul 31 19:52:44 2021
+++ src/usr.bin/xlint/lint2/read.c	Thu Aug  5 06:45:37 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.46 2021/07/31 19:52:44 rillig Exp $ */
+/* $NetBSD: read.c,v 1.47 2021/08/05 06:45:37 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: read.c,v 1.46 2021/07/31 19:52:44 rillig Exp $");
+__RCSID("$NetBSD: read.c,v 1.47 2021/08/05 06:45:37 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -838,6 +838,15 @@ gettlen(const char *cp, const char **epp
 			t = QUAD;
 		}
 		break;
+#ifdef INT128_SIZE
+	case 'J':
+		if (s == 'u') {
+			t = UINT128;
+		} else if (s == '\0') {
+			t = INT128;
+		}
+		break;
+#endif
 	case 'D':
 		if (s == 's') {
 			t = FLOAT;

Reply via email to