Multiline error and warning messages in the libstdc++ testsuite - take 2

Billinghurst, David (CRTS) David.Billinghurst@riotinto.com
Fri Jan 4 06:18:00 GMT 2002


This version incorporates the feedback on first patch.  Now use
-fmessage-length=0 to keep the compiler messages on a single line.  Also
removes the dg-excess-errors comments from
23_containers/map_operators.cc and 23_containers/set_operators.cc.

Bootstrapped on i686-pc-cygwin.  Two fewer expected failures.

2002-01-05  David Billinghurst <David.Billinghurst@riotinto.com>

	* tests_flags.in:  Add -fmessage-length=0 to CXXFLAGS
	testsuite/lib/prune.exp: Delete lines ":In function ..." 
	from compiler output
	testsuite/23_containers/map_operators.cc: Remove 
	dg-excess-errors comment
	testsuite/23_containers/set_operators.cc: Likewise

Index: testsuite_flags.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite_flags.in,v
retrieving revision 1.10
diff -u -r1.10 testsuite_flags.in
--- testsuite_flags.in  2001/09/05 22:38:05     1.10
+++ testsuite_flags.in  2002/01/04 14:05:42
@@ -48,7 +48,8 @@
       echo ${CXX}
       ;;
     --cxxflags)
-      CXXFLAGS=' -g @SECTION_FLAGS@ @SECTION_LDFLAGS@
+      CXXFLAGS=' -g @SECTION_FLAGS@ @SECTION_LDFLAGS@
+                -fmessage-length=0
                 -DDEBUG_ASSERT  -DLOCALEDIR="@glibcpp_localedir@" '
       echo ${CXXFLAGS}
       ;;
Index: testsuite/lib/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/04 14:05:42
@@ -21,5 +21,9 @@
     # Cygwin warns about -ffunction-sections
     regsub -all "(^|\n)\[^\n\]*: -ffunction-sections may affect
debugging on some targets\[^\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
 }
Index: testsuite/23_containers/map_operators.cc
===================================================================
RCS file:
/cvs/gcc/gcc/libstdc++-v3/testsuite/23_containers/map_operators.cc,v
retrieving revision 1.7
diff -u -r1.7 map_operators.cc
--- map_operators.cc    2001/11/28 06:35:00     1.7
+++ map_operators.cc    2002/01/04 14:05:42
@@ -25,7 +25,6 @@
 #include <iostream>

 // { dg-do compile }
-// { dg-excess-errors "" }

 // libstdc++/86: map & set iterator comparisons are not type-safe
 void test01()
Index: testsuite/23_containers/set_operators.cc
===================================================================
RCS file:
/cvs/gcc/gcc/libstdc++-v3/testsuite/23_containers/set_operators.cc,v
retrieving revision 1.5
diff -u -r1.5 set_operators.cc
--- set_operators.cc    2001/11/28 06:35:00     1.5
+++ set_operators.cc    2002/01/04 14:05:42
@@ -24,7 +24,6 @@
 #include <string>

 // { dg-do compile }
-// { dg-excess-errors "" }

 // libstdc++/86: map & set iterator comparisons are not type-safe
 int main(void)



More information about the Libstdc++ mailing list