This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[libsupc++_related] Suppress warning in unwind-pe.h


Hi,

we are getting this warning:

In file included from ../../../../gcc-head/gcc/libstdc++-v3/libsupc++/eh_personality.cc:38:
/home/paolo/Gcc/cvs-dirs/gcc-head/gcc/libstdc++-v3/../gcc/unwind-pe.h: In function `const unsigned
char* read_encoded_value_with_base(unsigned char, _Unwind_Ptr, const unsigned char*, _Unwind_Ptr*)'
:
/home/paolo/Gcc/cvs-dirs/gcc-head/gcc/libstdc++-v3/../gcc/unwind-pe.h:194: warning: cast from `cons
t unsigned char*' to `read_encoded_value_with_base(unsigned char, _Unwind_Ptr, const unsigned char*
, _Unwind_Ptr*)::unaligned*' discards qualifiers from pointer target type


which I fixed with the below, regtested on i686-pc-linux-gnu, C, C++.

Ok?

Paolo.

///////////
2003-10-03  Paolo Carlini  <pcarlini@unitus.it>

	* unwind-pe.h (read_encoded_value_with_base): Constify u and
	its inizialization cast.
--- unwind-pe.h.~1.13.~	2003-08-19 22:53:24.000000000 +0200
+++ unwind-pe.h	2003-10-03 11:23:46.000000000 +0200
@@ -191,7 +191,7 @@
       signed s8 __attribute__ ((mode (DI)));
     } __attribute__((__packed__));
 
-  union unaligned *u = (union unaligned *) p;
+  const union unaligned *u = (const union unaligned *) p;
   _Unwind_Internal_Ptr result;
 
   if (encoding == DW_EH_PE_aligned)

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