Module Name:    src
Committed By:   rillig
Date:           Sat Jul  3 21:27:48 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_097.exp msg_098.exp msg_127.exp
        src/usr.bin/xlint/lint1: main1.c

Log Message:
lint: do not define 'long double' GCC builtins for traditional C


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_097.exp
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_098.exp \
    src/tests/usr.bin/xlint/lint1/msg_127.exp
cvs rdiff -u -r1.47 -r1.48 src/usr.bin/xlint/lint1/main1.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/msg_097.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_097.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_097.exp:1.3
--- src/tests/usr.bin/xlint/lint1/msg_097.exp:1.2	Thu Jan  7 00:38:46 2021
+++ src/tests/usr.bin/xlint/lint1/msg_097.exp	Sat Jul  3 21:27:48 2021
@@ -1,10 +1,3 @@
-(1): warning: 'long double' is illegal in traditional C [266]
-(1): warning: function prototypes are illegal in traditional C [270]
-(2): warning: 'long double' is illegal in traditional C [266]
-(2): warning: function prototypes are illegal in traditional C [270]
-(3): warning: 'long double' is illegal in traditional C [266]
-(3): warning: 'long double' is illegal in traditional C [266]
-(3): warning: function prototypes are illegal in traditional C [270]
 msg_097.c(13): warning: suffix U is illegal in traditional C [97]
 msg_097.c(14): warning: suffix U is illegal in traditional C [97]
 msg_097.c(17): warning: suffix U is illegal in traditional C [97]

Index: src/tests/usr.bin/xlint/lint1/msg_098.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_098.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_098.exp:1.4
--- src/tests/usr.bin/xlint/lint1/msg_098.exp:1.3	Sun Mar 21 20:44:59 2021
+++ src/tests/usr.bin/xlint/lint1/msg_098.exp	Sat Jul  3 21:27:48 2021
@@ -1,10 +1,3 @@
-(1): warning: 'long double' is illegal in traditional C [266]
-(1): warning: function prototypes are illegal in traditional C [270]
-(2): warning: 'long double' is illegal in traditional C [266]
-(2): warning: function prototypes are illegal in traditional C [270]
-(3): warning: 'long double' is illegal in traditional C [266]
-(3): warning: 'long double' is illegal in traditional C [266]
-(3): warning: function prototypes are illegal in traditional C [270]
 msg_098.c(12): warning: suffixes F and L are illegal in traditional C [98]
 msg_098.c(13): warning: suffixes F and L are illegal in traditional C [98]
 msg_098.c(16): error: syntax error 'U' [249]
Index: src/tests/usr.bin/xlint/lint1/msg_127.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_127.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_127.exp:1.4
--- src/tests/usr.bin/xlint/lint1/msg_127.exp:1.3	Sun Jan 31 11:12:07 2021
+++ src/tests/usr.bin/xlint/lint1/msg_127.exp	Sat Jul  3 21:27:48 2021
@@ -1,8 +1 @@
-(1): warning: 'long double' is illegal in traditional C [266]
-(1): warning: function prototypes are illegal in traditional C [270]
-(2): warning: 'long double' is illegal in traditional C [266]
-(2): warning: function prototypes are illegal in traditional C [270]
-(3): warning: 'long double' is illegal in traditional C [266]
-(3): warning: 'long double' is illegal in traditional C [266]
-(3): warning: function prototypes are illegal in traditional C [270]
 msg_127.c(11): warning: '&' before array or function: ignored [127]

Index: src/usr.bin/xlint/lint1/main1.c
diff -u src/usr.bin/xlint/lint1/main1.c:1.47 src/usr.bin/xlint/lint1/main1.c:1.48
--- src/usr.bin/xlint/lint1/main1.c:1.47	Sat Jul  3 20:43:35 2021
+++ src/usr.bin/xlint/lint1/main1.c	Sat Jul  3 21:27:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: main1.c,v 1.47 2021/07/03 20:43:35 rillig Exp $	*/
+/*	$NetBSD: main1.c,v 1.48 2021/07/03 21:27:48 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: main1.c,v 1.47 2021/07/03 20:43:35 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.48 2021/07/03 21:27:48 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -266,7 +266,7 @@ main(int argc, char *argv[])
 	initdecl();
 	initscan();
 
-	if (gflag) {
+	if (gflag && !tflag) {
 		if ((yyin = gcc_builtins()) == NULL)
 			err(1, "cannot open builtins");
 		yyparse();

Reply via email to