PATCH: -Wall -Wsystem-headers nits; preemptive check on one system

Loren James Rittle rittle@latour.rsch.comm.mot.com
Tue Apr 15 06:19:00 GMT 2003


> (To fellow library maintainers, on mainline, shall we force
> 17_intro/headers.cc to run with this additional warning checks on
> *-*-freebsd* since they claim to have zero warning system headers?)

As committed to mainline as obvious (I did rerun the failing test case
after applying the related patch; and it passed).  Thank you to Warner
for reporting the first nit (against 3.3 branch).

	* include/std/std_bitset.h (_M_do_find_next): Fix -Wall nit.
	* include/bits/concept_check.h: Fix multi-line comment.
	* testsuite/17_intro/headers.cc (dg-options): Add -Wall -Wsystem-headers
	when target is *-*-freebsd*.

Index: include/std/std_bitset.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/std/std_bitset.h,v
retrieving revision 1.12
diff -c -r1.12 std_bitset.h
*** include/std/std_bitset.h	3 Feb 2003 19:37:53 -0000	1.12
--- include/std/std_bitset.h	15 Apr 2003 05:58:20 -0000
***************
*** 414,420 ****
        _M_do_find_next(size_t __prev, size_t __not_found) const
        {
  	++__prev;
! 	if (__prev >= _GLIBCPP_BITSET_BITS_PER_WORD)
  	  return __not_found;
  
  	_WordT __x = _M_w >> __prev;
--- 414,420 ----
        _M_do_find_next(size_t __prev, size_t __not_found) const
        {
  	++__prev;
! 	if (__prev >= ((size_t) _GLIBCPP_BITSET_BITS_PER_WORD))
  	  return __not_found;
  
  	_WordT __x = _M_w >> __prev;
Index: include/bits/concept_check.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/concept_check.h,v
retrieving revision 1.5
diff -c -r1.5 concept_check.h
*** include/bits/concept_check.h	2 Nov 2001 17:38:10 -0000	1.5
--- include/bits/concept_check.h	15 Apr 2003 05:58:20 -0000
***************
*** 61,68 ****
  
  // Note that the obvious and elegant approach of
  //
! //#define glibcpp_function_requires(C)      \
! //            boost::function_requires< boost::C >()
  //
  // won't work due to concept templates with more than one parameter, e.g.,
  // BinaryPredicateConcept.  The preprocessor tries to split things up on
--- 61,67 ----
  
  // Note that the obvious and elegant approach of
  //
! //#define glibcpp_function_requires(C) boost::function_requires< boost::C >()
  //
  // won't work due to concept templates with more than one parameter, e.g.,
  // BinaryPredicateConcept.  The preprocessor tries to split things up on
Index: testsuite/17_intro/headers.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/17_intro/headers.cc,v
retrieving revision 1.3
diff -c -r1.3 headers.cc
*** testsuite/17_intro/headers.cc	12 May 2001 16:51:41 -0000	1.3
--- testsuite/17_intro/headers.cc	15 Apr 2003 05:58:20 -0000
***************
*** 18,23 ****
--- 18,26 ----
  // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  // USA.
  
+ // FreeBSD wants warning clean system headers:
+ // { dg-options "-Wall -Wsystem-headers" { target *-*-freebsd* } }
+ 
  // 17.4.1.2 Headers
  
  



More information about the Libstdc++ mailing list