Module Name:    src
Committed By:   rillig
Date:           Sat Feb 18 15:09:10 UTC 2023

Modified Files:
        src/usr.bin/xlint/lint1: lex.c

Log Message:
lint: remove dead code from lex_floating_constant

Neither traditional C nor C11 allows a trailing 'd' or 'D' on floating
point constants. Java does, but lint does not cover Java programs.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/usr.bin/xlint/lint1/lex.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/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.151 src/usr.bin/xlint/lint1/lex.c:1.152
--- src/usr.bin/xlint/lint1/lex.c:1.151	Sat Feb 18 15:05:38 2023
+++ src/usr.bin/xlint/lint1/lex.c	Sat Feb 18 15:09:10 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.151 2023/02/18 15:05:38 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.152 2023/02/18 15:09:10 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: lex.c,v 1.151 2023/02/18 15:05:38 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.152 2023/02/18 15:09:10 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -639,11 +639,8 @@ lex_floating_constant(const char *yytext
 	} else if (c == 'l' || c == 'L') {
 		typ = LDOUBLE;
 		len--;
-	} else {
-		if (c == 'd' || c == 'D')
-			len--;
+	} else
 		typ = DOUBLE;
-	}
 
 	if (!allow_c90 && typ != DOUBLE) {
 		/* suffixes F and L are illegal in traditional C */

Reply via email to