This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Multiline error and warning messages in the libstdc++ testsuite
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 3 Jan 2002 23:30:13 -0000
- Subject: Multiline error and warning messages in the libstdc++ testsuite
Multiline error and warning messages from g++ confuse the libstdc++-v3
testsuite. This is worked around with "excess error" tests. See, for
example, 23_containers/set_operators.cc and the discussion in
libstdc++/5145 and libstdc++/5146.
The error processing is done in procedure dg-test, which is part of
dejagnu. Rather than change this it seemed simpler to unwrap the
multi-line messages, converting them back to single lines of text.
With this done, the "In function ...." messages still causes a problem.
I have pruned this message, as a search through the test log file shows
they are not required (by the testsuite). With these changes, the
excess error test can be removed from test
23_containers/set_operators.cc.
Tested on i686-pc-cygwin.
2002-01-04 David Billinghurst <David.Billinghurst@riotinto.com>
* testsuite/lib/prune.exp: Unwrap multi-line warnings into
single lines of text.
Delete lines "In function ..." from compiler output
Index: prune.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/prune.exp,v
retrieving revision 1.2
diff -u -r1.2 prune.exp
--- prune.exp 2002/01/03 14:25:14 1.2
+++ prune.exp 2002/01/03 23:24:59
@@ -21,5 +21,13 @@
# Cygwin warns about -ffunction-sections
regsub -all "(^|\n)\[^\n\]*: -ffunction-sections may affect
debugging on some targets\[^\n\]*" $text "" text
+ # Unwrap multi-line warnings so dejagnu can process them
+ # Second and subsequent lines indicated by leading blanks
+ regsub -all "\n +" $text " " text
+
+ # Remove parts of warnings that refer to location of previous
+ # definitions, etc as these confuse dejagnu
+ regsub -all "(^|\n)\[^\n\]*: In function \[^\n\]*" $text "" text
+
return $text
}