You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2007/10/18 17:49:37 UTC

status of fix for incompatibilities in exception classes on Windows

What is the status of the patch for the unsats for the exception
classes on Windows? Anyone working on it? Farid? Travis?

Martin

Re: HA: status of fix for incompatibilities in exception classes on Windows

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
>  
> 
> Martin Sebor wrote:
>> Farid Zaripov wrote:
>>>> From: Travis Vitek wrote:
>>>>
>>>> That is fine.
>>>>
>>>>
>>>> 2007-10-18  Travis Vitek  <vi...@roguewave.com>
>>>>
>>>>         * _config-msvc.h [_RWSTD_VER_MAJOR]: Define configuration
>>>>         macros to enable binary compatibility with 4.1.3 on MSVC.
>>>  
>>>   I think, that this patch should be applied to 
>> _config_msvcrt.h, not to _config-msvc.h. 
>>
>> Thank you, sir!
>>
>> Corrected thusly:
>>   http://svn.apache.org/viewvc?rev=586131&view=rev
>>   http://svn.apache.org/viewvc?rev=586132&view=rev
>>
>> Martin
>>
> 
> Thank you for that. I didn't realize that _config_msvcrt.h was even in
> there. Now I see that it is a shared header used by both the Intel and
> Microsoft compilers on Win32.

I forgot about it myself, even though the thought of doing
the same thing for Intel C++ had briefly crossed my mind
(only to vanish into the dark recesses of my cranium...;)

Martin


RE: HA: status of fix for incompatibilities in exception classes on Windows

Posted by Travis Vitek <Tr...@roguewave.com>.
 

Martin Sebor wrote:
>
>Farid Zaripov wrote:
>>>
>>> From: Travis Vitek wrote:
>>>
>>> That is fine.
>>>
>>>
>>> 2007-10-18  Travis Vitek  <vi...@roguewave.com>
>>>
>>>         * _config-msvc.h [_RWSTD_VER_MAJOR]: Define configuration
>>>         macros to enable binary compatibility with 4.1.3 on MSVC.
>>  
>>   I think, that this patch should be applied to 
>_config_msvcrt.h, not to _config-msvc.h. 
>
>Thank you, sir!
>
>Corrected thusly:
>   http://svn.apache.org/viewvc?rev=586131&view=rev
>   http://svn.apache.org/viewvc?rev=586132&view=rev
>
>Martin
>

Thank you for that. I didn't realize that _config_msvcrt.h was even in
there. Now I see that it is a shared header used by both the Intel and
Microsoft compilers on Win32.

Re: HA: status of fix for incompatibilities in exception classes on Windows

Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:
>> From: Travis Vitek [mailto:Travis.Vitek@roguewave.com]
>> Sent: Чт, 18.10.2007 22:59
>> To: stdcxx-dev@incubator.apache.org
>> Subject: RE: status of fix for incompatibilities in exception classes on Windows
>>
>> That is fine.
>>
>>
>> 2007-10-18  Travis Vitek  <vi...@roguewave.com>
>>
>>         * _config-msvc.h [_RWSTD_VER_MAJOR]: Define configuration
>>         macros to enable binary compatibility with 4.1.3 on MSVC.
>  
>   I think, that this patch should be applied to _config_msvcrt.h, not to _config-msvc.h. 

Thank you, sir!

Corrected thusly:
   http://svn.apache.org/viewvc?rev=586131&view=rev
   http://svn.apache.org/viewvc?rev=586132&view=rev

Martin

HA: status of fix for incompatibilities in exception classes on Windows

Posted by Farid Zaripov <Fa...@epam.com>.
> From: Travis Vitek [mailto:Travis.Vitek@roguewave.com]
> Sent: Чт, 18.10.2007 22:59
> To: stdcxx-dev@incubator.apache.org
> Subject: RE: status of fix for incompatibilities in exception classes on Windows
> 
> That is fine.
> 
> 
> 2007-10-18  Travis Vitek  <vi...@roguewave.com>
> 
>         * _config-msvc.h [_RWSTD_VER_MAJOR]: Define configuration
>         macros to enable binary compatibility with 4.1.3 on MSVC.
 
  I think, that this patch should be applied to _config_msvcrt.h, not to _config-msvc.h. 

Farid.
 

RE: status of fix for incompatibilities in exception classes on Windows

Posted by Travis Vitek <Tr...@roguewave.com>.
>Martin Sebor wrote:
>
>Travis Vitek wrote:
>>  
>> 
>> Travis Vitek wrote:
>>> I totally forgot about it after scrambling to get the other 
>>> patch made last night. I'll post a patch for review ASAP.
>>>
>>>
>>> Martin Sebor wrote:
>>>> What is the status of the patch for the unsats for the exception
>>>> classes on Windows? Anyone working on it? Farid? Travis?
>>>>
>>>> Martin
>>>>
>> 
>> I have verified this patch with the 4.1.3 examples compiled 
>> msvc-7.1 and the 4.2.0 dll compiled with msvc-7.1. I added a
>> new conditional block for this just to avoid any issues that
>> might come up when applying the other patch to this same file.
>> Hope that doesn't cause problems for anyone.
>
>What's the rationale for constraining the patch to exclude MSVC
>8.0 and later?
>
>That mixing two different versions of the same compiler and two
>different versions of stdcxx is already known to have problems?
>I think I would just as soon not make the problem worse. Would
>you mid if I removed the _MSC_VER part of the conditional?
>

That is fine.


2007-10-18  Travis Vitek  <vi...@roguewave.com>

	* _config-msvc.h [_RWSTD_VER_MAJOR]: Define configuration
	macros to enable binary compatibility with 4.1.3 on MSVC.


Re: status of fix for incompatibilities in exception classes on Windows

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
>  
> 
> Travis Vitek wrote:
>> I totally forgot about it after scrambling to get the other patch made
>> last night. I'll post a patch for review ASAP.
>>
>>
>> Martin Sebor wrote:
>>> What is the status of the patch for the unsats for the exception
>>> classes on Windows? Anyone working on it? Farid? Travis?
>>>
>>> Martin
>>>
> 
> I have verified this patch with the 4.1.3 examples compiled msvc-7.1 and
> the 4.2.0 dll compiled with msvc-7.1. I added a new conditional block
> for this just to avoid any issues that might come up when applying the
> other patch to this same file. Hope that doesn't cause problems for
> anyone.

What's the rationale for constraining the patch to exclude MSVC
8.0 and later?

That mixing two different versions of the same compiler and two
different versions of stdcxx is already known to have problems?
I think I would just as soon not make the problem worse. Would
you mid if I removed the _MSC_VER part of the conditional?

Martin

> 
> Travis
> 
> 
> Index: _config-msvc.h
> ===================================================================
> --- _config-msvc.h	(revision 586068)
> +++ _config-msvc.h	(working copy)
> @@ -58,6 +58,21 @@
>  
>  #endif   // MSVC <= 6.0
>  
> +#if (_MSC_VER < 1400) && (_RWSTD_VER_MAJOR < 5)
> +   // defined for binary compatibility with stdcxx 4.1.x
> +#  define _RWSTD_NO_BAD_CAST_ASSIGNMENT
> +#  define _RWSTD_NO_BAD_CAST_COPY_CTOR
> +#  define _RWSTD_NO_BAD_CAST_DTOR
> +#  define _RWSTD_NO_BAD_TYPEID_ASSIGNMENT
> +#  define _RWSTD_NO_BAD_TYPEID_COPY_CTOR
> +#  define _RWSTD_NO_BAD_TYPEID_DTOR
> +#  define _RWSTD_NO_EXCEPTION_ASSIGNMENT
> +#  define _RWSTD_NO_EXCEPTION_COPY_CTOR
> +#  define _RWSTD_NO_EXCEPTION_DEFAULT_CTOR
> +#  define _RWSTD_NO_EXCEPTION_DTOR
> +#  define _RWSTD_NO_EXCEPTION_WHAT
> +#endif   // _MSC_VER && _RWSTD_VER_MAJOR
> +
>     // disable "Same type qualifier used more than once"
>  #  pragma warning (disable: 4114)
>  


RE: status of fix for incompatibilities in exception classes on Windows

Posted by Travis Vitek <tv...@roguewave.com>.
 

Travis Vitek wrote:
>
>I totally forgot about it after scrambling to get the other patch made
>last night. I'll post a patch for review ASAP.
> 
>
>Martin Sebor wrote:
>>
>>What is the status of the patch for the unsats for the exception
>>classes on Windows? Anyone working on it? Farid? Travis?
>>
>>Martin
>>
>

I have verified this patch with the 4.1.3 examples compiled msvc-7.1 and
the 4.2.0 dll compiled with msvc-7.1. I added a new conditional block
for this just to avoid any issues that might come up when applying the
other patch to this same file. Hope that doesn't cause problems for
anyone.

Travis


Index: _config-msvc.h
===================================================================
--- _config-msvc.h	(revision 586068)
+++ _config-msvc.h	(working copy)
@@ -58,6 +58,21 @@
 
 #endif   // MSVC <= 6.0
 
+#if (_MSC_VER < 1400) && (_RWSTD_VER_MAJOR < 5)
+   // defined for binary compatibility with stdcxx 4.1.x
+#  define _RWSTD_NO_BAD_CAST_ASSIGNMENT
+#  define _RWSTD_NO_BAD_CAST_COPY_CTOR
+#  define _RWSTD_NO_BAD_CAST_DTOR
+#  define _RWSTD_NO_BAD_TYPEID_ASSIGNMENT
+#  define _RWSTD_NO_BAD_TYPEID_COPY_CTOR
+#  define _RWSTD_NO_BAD_TYPEID_DTOR
+#  define _RWSTD_NO_EXCEPTION_ASSIGNMENT
+#  define _RWSTD_NO_EXCEPTION_COPY_CTOR
+#  define _RWSTD_NO_EXCEPTION_DEFAULT_CTOR
+#  define _RWSTD_NO_EXCEPTION_DTOR
+#  define _RWSTD_NO_EXCEPTION_WHAT
+#endif   // _MSC_VER && _RWSTD_VER_MAJOR
+
    // disable "Same type qualifier used more than once"
 #  pragma warning (disable: 4114)
 

Re: status of fix for incompatibilities in exception classes on Windows

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
> I totally forgot about it after scrambling to get the other patch made
> last night. I'll post a patch for review ASAP.

I'm testing it with MSVC 8.0 right now, but if you could double
heck it in your environment as well, perhaps with a different
version of the compiler (and/or with Intel C++) just to be safe,
that would be great.

Martin

PS I just took your list of config macros from the STDCXX-509
thread and uncommented the ones that were commented out in
4.2.0 and #defined in 4.1.3. I.e., I added the following to
the end of the generated config.h:

#define _RWSTD_NO_BAD_CAST_ASSIGNMENT
#define _RWSTD_NO_BAD_CAST_COPY_CTOR
#define _RWSTD_NO_BAD_CAST_DTOR

#define _RWSTD_NO_BAD_TYPEID_ASSIGNMENT
#define _RWSTD_NO_BAD_TYPEID_COPY_CTOR
#define _RWSTD_NO_BAD_TYPEID_DTOR

#define _RWSTD_NO_EXCEPTION_ASSIGNMENT
#define _RWSTD_NO_EXCEPTION_COPY_CTOR
#define _RWSTD_NO_EXCEPTION_DEFAULT_CTOR
#define _RWSTD_NO_EXCEPTION_DTOR
#define _RWSTD_NO_EXCEPTION_WHAT

>  
> 
>> -----Original Message-----
>> From: Martin Sebor [mailto:sebor@roguewave.com] 
>> Sent: Thursday, October 18, 2007 8:50 AM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: status of fix for incompatibilities in exception 
>> classes on Windows
>>
>> What is the status of the patch for the unsats for the exception
>> classes on Windows? Anyone working on it? Farid? Travis?
>>
>> Martin
>>


Re: status of fix for incompatibilities in exception classes on Windows

Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Travis Vitek [mailto:tvitek@roguewave.com] 
>> Sent: Thursday, October 18, 2007 7:24 PM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: RE: status of fix for incompatibilities in exception 
>> classes on Windows
>>
>>
>> I totally forgot about it after scrambling to get the other 
>> patch made last night. I'll post a patch for review ASAP.
>>  
>>
>>> -----Original Message-----
>>> From: Martin Sebor [mailto:sebor@roguewave.com]
>>> Sent: Thursday, October 18, 2007 8:50 AM
>>> To: stdcxx-dev@incubator.apache.org
>>> Subject: status of fix for incompatibilities in exception classes on 
>>> Windows
>>>
>>> What is the status of the patch for the unsats for the exception 
>>> classes on Windows? Anyone working on it? Farid? Travis?
>>>
>>> Martin
> 
>   The patch is very simple:
> 
> Index: _config-msvcrt.h
> ===================================================================
> --- _config-msvcrt.h	(revision 586020)
> +++ _config-msvcrt.h	(working copy)
> @@ -219,3 +219,18 @@
>  typedef unsigned short wchar_t;
>  
>  #endif   // _NATIVE_WCHAR_T_DEFINED
> +
> +#if 5 <= _RWSTD_VER_MAJOR

Don't you mean: #if 5 > _RWSTD_VER_MAJOR

The patch might be simple but testing it is non-trivial.

Martin

> +   // defined for binary compatibility with stdcxx 4.1.x
> +#  define _RWSTD_NO_BAD_CAST_ASSIGNMENT
> +#  define _RWSTD_NO_BAD_CAST_COPY_CTOR
> +#  define _RWSTD_NO_BAD_CAST_DTOR
> +#  define _RWSTD_NO_BAD_TYPEID_ASSIGNMENT
> +#  define _RWSTD_NO_BAD_TYPEID_COPY_CTOR
> +#  define _RWSTD_NO_BAD_TYPEID_DTOR
> +#  define _RWSTD_NO_EXCEPTION_ASSIGNMENT
> +#  define _RWSTD_NO_EXCEPTION_COPY_CTOR
> +#  define _RWSTD_NO_EXCEPTION_DEFAULT_CTOR
> +#  define _RWSTD_NO_EXCEPTION_DTOR
> +#  define _RWSTD_NO_EXCEPTION_WHAT
> +#endif   // 5 <= stdcxx version
> 
> Farid.


RE: status of fix for incompatibilities in exception classes on Windows

Posted by Farid Zaripov <Fa...@epam.com>.
> -----Original Message-----
> From: Travis Vitek [mailto:tvitek@roguewave.com] 
> Sent: Thursday, October 18, 2007 7:24 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: RE: status of fix for incompatibilities in exception 
> classes on Windows
> 
> 
> I totally forgot about it after scrambling to get the other 
> patch made last night. I'll post a patch for review ASAP.
>  
> 
> >-----Original Message-----
> >From: Martin Sebor [mailto:sebor@roguewave.com]
> >Sent: Thursday, October 18, 2007 8:50 AM
> >To: stdcxx-dev@incubator.apache.org
> >Subject: status of fix for incompatibilities in exception classes on 
> >Windows
> >
> >What is the status of the patch for the unsats for the exception 
> >classes on Windows? Anyone working on it? Farid? Travis?
> >
> >Martin

  The patch is very simple:

Index: _config-msvcrt.h
===================================================================
--- _config-msvcrt.h	(revision 586020)
+++ _config-msvcrt.h	(working copy)
@@ -219,3 +219,18 @@
 typedef unsigned short wchar_t;
 
 #endif   // _NATIVE_WCHAR_T_DEFINED
+
+#if 5 <= _RWSTD_VER_MAJOR
+   // defined for binary compatibility with stdcxx 4.1.x
+#  define _RWSTD_NO_BAD_CAST_ASSIGNMENT
+#  define _RWSTD_NO_BAD_CAST_COPY_CTOR
+#  define _RWSTD_NO_BAD_CAST_DTOR
+#  define _RWSTD_NO_BAD_TYPEID_ASSIGNMENT
+#  define _RWSTD_NO_BAD_TYPEID_COPY_CTOR
+#  define _RWSTD_NO_BAD_TYPEID_DTOR
+#  define _RWSTD_NO_EXCEPTION_ASSIGNMENT
+#  define _RWSTD_NO_EXCEPTION_COPY_CTOR
+#  define _RWSTD_NO_EXCEPTION_DEFAULT_CTOR
+#  define _RWSTD_NO_EXCEPTION_DTOR
+#  define _RWSTD_NO_EXCEPTION_WHAT
+#endif   // 5 <= stdcxx version

Farid.

RE: status of fix for incompatibilities in exception classes on Windows

Posted by Travis Vitek <tv...@roguewave.com>.
I totally forgot about it after scrambling to get the other patch made
last night. I'll post a patch for review ASAP.
 

>-----Original Message-----
>From: Martin Sebor [mailto:sebor@roguewave.com] 
>Sent: Thursday, October 18, 2007 8:50 AM
>To: stdcxx-dev@incubator.apache.org
>Subject: status of fix for incompatibilities in exception 
>classes on Windows
>
>What is the status of the patch for the unsats for the exception
>classes on Windows? Anyone working on it? Farid? Travis?
>
>Martin
>