[Libreoffice-commits] .: 2 commits - bridges/source cppu/inc

Caolán McNamara caolan at kemper.freedesktop.org
Wed Oct 20 05:01:41 PDT 2010


 bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk     |    2 
 bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk       |    2 
 bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk      |    2 
 bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk      |    2 
 bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk     |    2 
 bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk      |    2 
 bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk      |    2 
 bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk   |    2 
 bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk |    2 
 bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk      |    2 
 bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk     |    2 
 bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk     |    4 
 bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk    |    2 
 bridges/source/jni_uno/jni_data.cxx                     |   44 +++----
 bridges/source/remote/urp/urp_propertyobject.cxx        |    2 
 cppu/inc/com/sun/star/uno/Any.hxx                       |   99 +++++++---------
 16 files changed, 84 insertions(+), 89 deletions(-)

New commits:
commit e3ef8152ac31106223339a232a72cea0806f4500
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 19 20:26:47 2010 +0100

    #i101100# strict-alias clean

diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx
index 0bb2aae..b8dc895 100644
--- a/bridges/source/jni_uno/jni_data.cxx
+++ b/bridges/source/jni_uno/jni_data.cxx
@@ -561,45 +561,45 @@ void Bridge::map_to_uno(
                 pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_CHAR:
-                *(jchar *) &pAny->pReserved = jni->CallCharMethodA(
+                pAny->pData = &pAny->pReserved;
+                *(jchar *) pAny->pData = jni->CallCharMethodA(
                     java_data.l, m_jni_info->m_method_Character_charValue, 0 );
                 jni.ensure_no_exception();
-                pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_BOOLEAN:
-                *(jboolean *) &pAny->pReserved = jni->CallBooleanMethodA(
+                pAny->pData = &pAny->pReserved;
+                *(jboolean *) pAny->pData = jni->CallBooleanMethodA(
                     java_data.l, m_jni_info->m_method_Boolean_booleanValue, 0 );
                 jni.ensure_no_exception();
-                pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_BYTE:
-                *(jbyte *) &pAny->pReserved = jni->CallByteMethodA(
+                pAny->pData = &pAny->pReserved;
+                *(jbyte *) pAny->pData = jni->CallByteMethodA(
                     java_data.l, m_jni_info->m_method_Byte_byteValue, 0 );
                 jni.ensure_no_exception();
-                pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_SHORT:
             case typelib_TypeClass_UNSIGNED_SHORT:
-                *(jshort *) &pAny->pReserved = jni->CallShortMethodA(
+                pAny->pData = &pAny->pReserved;
+                *(jshort *) pAny->pData = jni->CallShortMethodA(
                     java_data.l, m_jni_info->m_method_Short_shortValue, 0 );
                 jni.ensure_no_exception();
-                pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_LONG:
             case typelib_TypeClass_UNSIGNED_LONG:
-                *(jint *) &pAny->pReserved = jni->CallIntMethodA(
+                pAny->pData = &pAny->pReserved;
+                *(jint *) pAny->pData = jni->CallIntMethodA(
                     java_data.l, m_jni_info->m_method_Integer_intValue, 0 );
                 jni.ensure_no_exception();
-                pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_HYPER:
             case typelib_TypeClass_UNSIGNED_HYPER:
                 if (sizeof (sal_Int64) <= sizeof (void *))
                 {
-                    *(jlong *) &pAny->pReserved = jni->CallLongMethodA(
+                    pAny->pData = &pAny->pReserved;
+                    *(jlong *) pAny->pData = jni->CallLongMethodA(
                         java_data.l, m_jni_info->m_method_Long_longValue, 0 );
                     jni.ensure_no_exception();
-                    pAny->pData = &pAny->pReserved;
                 }
                 else
                 {
@@ -614,10 +614,10 @@ void Bridge::map_to_uno(
             case typelib_TypeClass_FLOAT:
                 if (sizeof (float) <= sizeof (void *))
                 {
-                    *(jfloat *) &pAny->pReserved = jni->CallFloatMethodA(
+                    pAny->pData = &pAny->pReserved;
+                    *(jfloat *) pAny->pData = jni->CallFloatMethodA(
                         java_data.l, m_jni_info->m_method_Float_floatValue, 0 );
                     jni.ensure_no_exception();
-                    pAny->pData = &pAny->pReserved;
                 }
                 else
                 {
@@ -632,12 +632,12 @@ void Bridge::map_to_uno(
             case typelib_TypeClass_DOUBLE:
                 if (sizeof (double) <= sizeof (void *))
                 {
-                    *(jdouble *) &pAny->pReserved =
+                    pAny->pData = &pAny->pReserved;
+                    *(jdouble *) pAny->pData =
                         jni->CallDoubleMethodA(
                             java_data.l,
                             m_jni_info->m_method_Double_doubleValue, 0 );
                     jni.ensure_no_exception();
-                    pAny->pData = &pAny->pReserved;
                 }
                 else
                 {
@@ -654,20 +654,20 @@ void Bridge::map_to_uno(
             case typelib_TypeClass_STRING:
                 // opt: anies often contain strings; copy string directly
                 pAny->pReserved = 0;
+                pAny->pData = &pAny->pReserved;
                 jstring_to_ustring(
-                    jni, (rtl_uString **)&pAny->pReserved,
+                    jni, (rtl_uString **)pAny->pData,
                     (jstring) java_data.l );
-                pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_TYPE:
             case typelib_TypeClass_ENUM:
             case typelib_TypeClass_SEQUENCE:
             case typelib_TypeClass_INTERFACE:
+                pAny->pData = &pAny->pReserved;
                 map_to_uno(
-                    jni, &pAny->pReserved, java_data,
+                    jni, pAny->pData, java_data,
                     value_td.get()->pWeakRef, 0,
                     false /* no assign */, false /* no out param */ );
-                pAny->pData = &pAny->pReserved;
                 break;
             case typelib_TypeClass_STRUCT:
             case typelib_TypeClass_EXCEPTION:
@@ -1658,7 +1658,7 @@ void Bridge::map_to_java(
             case typelib_TypeClass_UNSIGNED_SHORT:
             {
                 jvalue args[ 2 ];
-                args[ 0 ].s = *(jshort const *) &pAny->pReserved;
+                args[ 0 ].s = *(jshort const *) pAny->pData;
                 JLocalAutoRef jo_val(
                     jni, jni->NewObjectA(
                         m_jni_info->m_class_Short,
@@ -1677,7 +1677,7 @@ void Bridge::map_to_java(
             case typelib_TypeClass_UNSIGNED_LONG:
             {
                 jvalue args[ 2 ];
-                args[ 0 ].i = *(jint const *) &pAny->pReserved;
+                args[ 0 ].i = *(jint const *) pAny->pData;
                 JLocalAutoRef jo_val(
                     jni, jni->NewObjectA(
                         m_jni_info->m_class_Integer,
diff --git a/bridges/source/remote/urp/urp_propertyobject.cxx b/bridges/source/remote/urp/urp_propertyobject.cxx
index f0ee67d..599156a 100644
--- a/bridges/source/remote/urp/urp_propertyobject.cxx
+++ b/bridges/source/remote/urp/urp_propertyobject.cxx
@@ -455,7 +455,7 @@ void SAL_CALL PropertyObject::implGetProperties( uno_Sequence **ppReturnValue )
     ProtocolProperty *pElements = (ProtocolProperty * ) ( *ppReturnValue )->elements;
     Properties *pP = m_pLocalSetting;
 
-    assignToIdl( &(pElements[PROPERTY_BRIDGEID]),PROPERTY_BRIDGEID, *(Sequence< sal_Int8 > *)&(pP->seqBridgeID) );
+    assignToIdl( &(pElements[PROPERTY_BRIDGEID]),PROPERTY_BRIDGEID, toUnoSequence(pP->seqBridgeID) );
     assignToIdl( &(pElements[PROPERTY_TYPECACHESIZE]),PROPERTY_TYPECACHESIZE,pP->nTypeCacheSize );
     assignToIdl( &(pElements[PROPERTY_OIDCACHESIZE]),PROPERTY_OIDCACHESIZE, pP->nOidCacheSize );
     assignToIdl( &(pElements[PROPERTY_TIDCACHESIZE]),PROPERTY_TIDCACHESIZE, pP->nTidCacheSize );
diff --git a/cppu/inc/com/sun/star/uno/Any.hxx b/cppu/inc/com/sun/star/uno/Any.hxx
index 5c78550..da95bb8 100644
--- a/cppu/inc/com/sun/star/uno/Any.hxx
+++ b/cppu/inc/com/sun/star/uno/Any.hxx
@@ -235,7 +235,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny,
 {
     if (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass)
     {
-        value = (* reinterpret_cast< const sal_Bool * >( &rAny.pReserved ) != sal_False);
+        value = (* reinterpret_cast< const sal_Bool * >( rAny.pData ) != sal_False);
         return sal_True;
     }
     return sal_False;
@@ -244,7 +244,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny,
 inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW( () )
 {
     return (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass &&
-            (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( &rAny.pReserved ) != sal_False));
+            (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.pData ) != sal_False));
 }
 
 //______________________________________________________________________________
@@ -255,7 +255,7 @@ inline sal_Bool SAL_CALL operator >>= ( Any const & rAny, bool & value )
     if (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN)
     {
         value = *reinterpret_cast< sal_Bool const * >(
-            &rAny.pReserved ) != sal_False;
+            rAny.pData ) != sal_False;
         return true;
     }
     return false;
@@ -268,7 +268,7 @@ inline sal_Bool SAL_CALL operator == ( Any const & rAny, bool const & value )
 {
     return (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN &&
             (value ==
-             (*reinterpret_cast< sal_Bool const * >( &rAny.pReserved )
+             (*reinterpret_cast< sal_Bool const * >( rAny.pData )
               != sal_False)));
 }
 
@@ -278,7 +278,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny,
 {
     if (typelib_TypeClass_BYTE == rAny.pType->eTypeClass)
     {
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     }
     return sal_False;
@@ -290,11 +290,11 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SA
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int16 * >( rAny.pData );
         return sal_True;
     default:
         return sal_False;
@@ -306,11 +306,11 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) S
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData );
         return sal_True;
     default:
         return sal_False;
@@ -323,17 +323,17 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SA
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
-        value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_LONG:
     case typelib_TypeClass_UNSIGNED_LONG:
-        value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int32 * >( rAny.pData );
         return sal_True;
     default:
         return sal_False;
@@ -345,17 +345,17 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) S
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
-        value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_LONG:
     case typelib_TypeClass_UNSIGNED_LONG:
-        value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData );
         return sal_True;
     default:
         return sal_False;
@@ -368,26 +368,24 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SA
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
-        value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_LONG:
-        value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int32 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_LONG:
-        value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_HYPER:
     case typelib_TypeClass_UNSIGNED_HYPER:
-        value = * reinterpret_cast< const sal_Int64 * >(
-            (sizeof(void *) >= sizeof(sal_Int64)) ? (void *)&rAny.pReserved : rAny.pData );
+        value = * reinterpret_cast< const sal_Int64 * >( rAny.pData );
         return sal_True;
-
     default:
         return sal_False;
     }
@@ -398,26 +396,24 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) S
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
-        value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_LONG:
-        value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int32 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_LONG:
-        value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_HYPER:
     case typelib_TypeClass_UNSIGNED_HYPER:
-        value = * reinterpret_cast< const sal_uInt64 * >(
-            (sizeof(void *) >= sizeof(sal_uInt64)) ? (void *)&rAny.pReserved : rAny.pData );
+        value = * reinterpret_cast< const sal_uInt64 * >( rAny.pData );
         return sal_True;
-
     default:
         return sal_False;
     }
@@ -429,19 +425,17 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_TH
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
-        value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_FLOAT:
-        value = * reinterpret_cast< const float * >(
-            (sizeof(void *) >= sizeof(float)) ? (void *)&rAny.pReserved : rAny.pData );
+        value = * reinterpret_cast< const float * >( rAny.pData );
         return sal_True;
-
     default:
         return sal_False;
     }
@@ -453,29 +447,26 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_T
     switch (rAny.pType->eTypeClass)
     {
     case typelib_TypeClass_BYTE:
-        value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int8 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_SHORT:
-        value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_LONG:
-        value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_Int32 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_UNSIGNED_LONG:
-        value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved );
+        value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_FLOAT:
-        value = * reinterpret_cast< const float * >(
-            (sizeof(void *) >= sizeof(float)) ? (void *)&rAny.pReserved : rAny.pData );
+        value = * reinterpret_cast< const float * >( rAny.pData );
         return sal_True;
     case typelib_TypeClass_DOUBLE:
-        value = * reinterpret_cast< const double * >(
-            (sizeof(void *) >= sizeof(double)) ? (void *)&rAny.pReserved : rAny.pData );
+        value = * reinterpret_cast< const double * >( rAny.pData );
         return sal_True;
-
     default:
         return sal_False;
     }
@@ -486,7 +477,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & valu
 {
     if (typelib_TypeClass_STRING == rAny.pType->eTypeClass)
     {
-        value = * reinterpret_cast< const ::rtl::OUString * >( &rAny.pReserved );
+        value = * reinterpret_cast< const ::rtl::OUString * >( rAny.pData );
         return sal_True;
     }
     return sal_False;
@@ -495,7 +486,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & valu
 inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW( () )
 {
     return (typelib_TypeClass_STRING == rAny.pType->eTypeClass &&
-            value.equals( * reinterpret_cast< const ::rtl::OUString * >( &rAny.pReserved ) ));
+            value.equals( * reinterpret_cast< const ::rtl::OUString * >( rAny.pData ) ));
 }
 // type
 //__________________________________________________________________________________________________
@@ -503,7 +494,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THR
 {
     if (typelib_TypeClass_TYPE == rAny.pType->eTypeClass)
     {
-        value = * reinterpret_cast< const Type * >( &rAny.pReserved );
+        value = * reinterpret_cast< const Type * >( rAny.pData );
         return sal_True;
     }
     return sal_False;
@@ -512,7 +503,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THR
 inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW( () )
 {
     return (typelib_TypeClass_TYPE == rAny.pType->eTypeClass &&
-            value.equals( * reinterpret_cast< const Type * >( &rAny.pReserved ) ));
+            value.equals( * reinterpret_cast< const Type * >( rAny.pData ) ));
 }
 // any
 //__________________________________________________________________________________________________
@@ -532,7 +523,7 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & v
 {
     if (typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass)
     {
-        return reinterpret_cast< const BaseReference * >( &rAny.pReserved )->operator == ( value );
+        return reinterpret_cast< const BaseReference * >( rAny.pData )->operator == ( value );
     }
     return sal_False;
 }
commit 2b837a464787efe7d63c9f63d7e039df7448f5b4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 19 20:24:31 2010 +0100

    explicitly -fno-strict-alias for linux bridges by default

diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
index 2650c43..5376b39 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 CFLAGSNOOPT=-O0
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
index 0900ec1..2c42dec 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
 CFLAGS += -DLEAK_STATIC_DATA
 .ENDIF
 
-CFLAGSCXX += -fno-omit-frame-pointer 
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 NOOPTFILES= \
     $(SLO)$/cpp2uno.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
index a160ed5..6fab7a4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
 CFLAGS += -DLEAK_STATIC_DATA
 .ENDIF
 
-CFLAGSCXX += -fno-omit-frame-pointer 
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 NOOPTFILES= \
     $(SLO)$/cpp2uno.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
index b4ac2ed..1e82cfa 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 NOOPTFILES= \
     $(SLO)$/uno2cpp.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
index d5eb2dd..c03a43c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 CFLAGSNOOPT=-O0
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
index 8ad89c9..3978bda 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
 CFLAGS += -DLEAK_STATIC_DATA
 .ENDIF
 
-CFLAGSCXX += -fno-omit-frame-pointer 
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 NOOPTFILES= \
     $(SLO)$/cpp2uno.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
index c71849f..f71750e 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 CFLAGSNOOPT=-O0
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
index 02906e1..9a75200 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
@@ -45,7 +45,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 NOOPTFILES= \
     $(SLO)$/uno2cpp.obj
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
index 2dd11d8..77763d7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 NOOPTFILES= \
     $(SLO)$/uno2cpp.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
index d71136a..bda85f3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 CFLAGSNOOPT=-O0
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
index c14cb15..9539dd6 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 CFLAGSNOOPT=-O0
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
index 71e799f..3940038 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
@@ -43,6 +43,10 @@ ENABLE_EXCEPTIONS=TRUE
 CFLAGS += -DLEAK_STATIC_DATA
 .ENDIF
 
+# In case someone enabled the non-standard -fomit-frame-pointer which does not
+# # work with the .cxx sources in this directory:
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
+
 CFLAGSNOOPT=-O0
 
 NOOPTFILES = \
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
index 8e62007..2913971 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
 
 # In case someone enabled the non-standard -fomit-frame-pointer which does not
 # work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
 
 SLOFILES= \
     $(SLO)$/abi.obj			\


More information about the Libreoffice-commits mailing list