From 84bd725260d9a7e808fcd148f472b97054049166 Mon Sep 17 00:00:00 2001 From: rth Date: Mon, 11 Feb 2002 01:31:53 +0000 Subject: [PATCH] * lib/target.exp (prune_warnings): Strip "In function" etc early. Adjust "dangerous" regexp for glibc's tmpnam warning. --- dejagnu/ChangeLog | 5 +++++ dejagnu/lib/target.exp | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dejagnu/ChangeLog b/dejagnu/ChangeLog index 5eba743a1a..7e7539437b 100644 --- a/dejagnu/ChangeLog +++ b/dejagnu/ChangeLog @@ -1,3 +1,8 @@ +2002-02-09 Richard Henderson + + * lib/target.exp (prune_warnings): Strip "In function" etc early. + Adjust "dangerous" regexp for glibc's tmpnam warning. + 2002-02-09 Alexandre Oliva * lib/libgloss.exp [get_multilibs]: Compute multitop earlier, and diff --git a/dejagnu/lib/target.exp b/dejagnu/lib/target.exp index e50df2001c..e8c3b6457d 100644 --- a/dejagnu/lib/target.exp +++ b/dejagnu/lib/target.exp @@ -128,10 +128,14 @@ proc pop_host { } { proc prune_warnings { text } { global host_triplet; - # remove the \r part of "\r\n" so we don't break all the patterns + # Remove the \r part of "\r\n" so we don't break all the patterns # we want to match. regsub -all -- "\r" $text "" text + # Remove all location tags. + regsub -all "(^|\n)\[^\n\]*: In (function|member|method|constructor|instantiation|program|subroutine|block-data) \[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*: At (top level|global scope):\[^\n\]*" $text "" text + # This is from sun4's. Do it for all machines for now. # The "\\1" is to try to preserve a "\n" but only if necessary. if [ishost "sparc-*-sunos*"] { @@ -266,10 +270,10 @@ proc prune_warnings { text } { regsub -all "(^|\n)(\[^\n\]*: warning: reference to compatibility glob\[^\n\]*\n?)" $text "\\1" text # GNU ld warns about functions marked as dangerous in GNU libc. - regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*function is dangerous\[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*is dangerous\[^\n\]*" $text "" text # Libgloss libnosys defines functions that warn when linked in - regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*is not implemented and will always fail\[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*is not implemented and will always fail\[^\n\]*" $text "" text # libstdc++-v3 tests can emit cpplib warnings due to duplicate -isystem / -I flags regsub -all "(^|\n)\[^\n\]*: warning: changing search order for system directory\[^\n\]*" $text "" text -- 2.11.0