This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Suspect warning in __enc_traits constructor


There is a warning that the 4 argument constructor for class
__enc_traits does not use the last two arguments.  I'd guess that's a
c&p bug.

Andreas.

2003-04-27  Andreas Schwab  <schwab at suse dot de>

	* config/locale/ieee_1003.1-2001/codecvt_specializations.h
	(__enc_traits): Use __ibom and __ebom instead of ignoring them.

--- libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h.~1.7.~	2003-02-06 23:42:57.000000000 +0100
+++ libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h	2003-04-27 10:08:13.000000000 +0200
@@ -36,7 +36,7 @@
 // Written by Benjamin Kosnik <bkoz at cygnus dot com>
 
   // XXX
-  // Define this here to codecvt.cc can have _S_max_size definition.
+  // Define this here so codecvt.cc can have _S_max_size definition.
 #define _GLIBCPP_USE___ENC_TRAITS 1
 
   // Extension to use icov for dealing with character encodings,
@@ -81,7 +81,7 @@
 
     explicit __enc_traits(const char* __int, const char* __ext, 
 			  int __ibom = 0, int __ebom = 0)
-    : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
+    : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(__ebom), _M_int_bom(__ibom)
     {
       strncpy(_M_int_enc, __int, _S_max_size);
       strncpy(_M_ext_enc, __ext, _S_max_size);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]