Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: do not define 'long double' GCC bu...



details:   https://anonhg.NetBSD.org/src/rev/4fce1127116a
branches:  trunk
changeset: 984336:4fce1127116a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 03 21:27:48 2021 +0000

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

diffstat:

 tests/usr.bin/xlint/lint1/msg_097.exp |  7 -------
 tests/usr.bin/xlint/lint1/msg_098.exp |  7 -------
 tests/usr.bin/xlint/lint1/msg_127.exp |  7 -------
 usr.bin/xlint/lint1/main1.c           |  6 +++---
 4 files changed, 3 insertions(+), 24 deletions(-)

diffs (67 lines):

diff -r 253f606367d3 -r 4fce1127116a tests/usr.bin/xlint/lint1/msg_097.exp
--- a/tests/usr.bin/xlint/lint1/msg_097.exp     Sat Jul 03 21:18:40 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_097.exp     Sat Jul 03 21:27:48 2021 +0000
@@ -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]
diff -r 253f606367d3 -r 4fce1127116a tests/usr.bin/xlint/lint1/msg_098.exp
--- a/tests/usr.bin/xlint/lint1/msg_098.exp     Sat Jul 03 21:18:40 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_098.exp     Sat Jul 03 21:27:48 2021 +0000
@@ -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]
diff -r 253f606367d3 -r 4fce1127116a tests/usr.bin/xlint/lint1/msg_127.exp
--- a/tests/usr.bin/xlint/lint1/msg_127.exp     Sat Jul 03 21:18:40 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_127.exp     Sat Jul 03 21:27:48 2021 +0000
@@ -1,8 +1,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]
diff -r 253f606367d3 -r 4fce1127116a usr.bin/xlint/lint1/main1.c
--- a/usr.bin/xlint/lint1/main1.c       Sat Jul 03 21:18:40 2021 +0000
+++ b/usr.bin/xlint/lint1/main1.c       Sat Jul 03 21:27:48 2021 +0000
@@ -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 @@
        initdecl();
        initscan();
 
-       if (gflag) {
+       if (gflag && !tflag) {
                if ((yyin = gcc_builtins()) == NULL)
                        err(1, "cannot open builtins");
                yyparse();



Home | Main Index | Thread Index | Old Index