stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r645736 - /stdcxx/trunk/include/string
Date Mon, 07 Apr 2008 23:33:44 GMT
Author: sebor
Date: Mon Apr  7 16:33:44 2008
New Revision: 645736

URL: http://svn.apache.org/viewvc?rev=645736&view=rev
Log:
2008-04-07  Martin Sebor  <sebor@roguewave.com>

	STDCXX-832
	* include/string (_C_pref): Used two static_casts in favor of
	reinterpret_cast to prevent HP aCC warning #4232: conversion
	from "wchar_t*" to a more strictly aligned type.

Modified:
    stdcxx/trunk/include/string

Modified: stdcxx/trunk/include/string
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/string?rev=645736&r1=645735&r2=645736&view=diff
==============================================================================
--- stdcxx/trunk/include/string (original)
+++ stdcxx/trunk/include/string Mon Apr  7 16:33:44 2008
@@ -23,7 +23,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2007 Rogue Wave Software, Inc.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  *
  **************************************************************************/
 
@@ -838,8 +838,11 @@
 
     void _C_clone (size_type);
 
-    _C_string_ref_type* _C_pref () const { 
-        return _RWSTD_REINTERPRET_CAST (_C_string_ref_type*, _C_data) - 1; 
+    _C_string_ref_type* _C_pref () const {
+        // use two static_casts in favor of reinterpret_cast
+        // to prevent "increased alignment" warnings
+        return _RWSTD_STATIC_CAST (_C_string_ref_type*,
+                   _RWSTD_STATIC_CAST (void*, _C_data)) - 1; 
     }
 
     void _C_unlink (pointer);   



Mime
View raw message