RE: Empty member initializers

2008-06-10 Thread Travis Vitek
 

Eric Lemings wrote:
>
> 
>From $TOPDIR/include/rw/_pair.h:
> 
> 64 // 20.2.2, p2
> 65 pair ()
> 66 #ifndef _RWSTD_NO_EMPTY_MEM_INITIALIZER
> 67 : first (/* lwg issue 265 */), second () { }
> 68 #else
> 69 // assumes types satisfy the CopyConstructible
requirements
> 70 : first (first_type ()), second (second_type ()) { }
> 71 #endif   // _RWSTD_NO_EMPTY_MEM_INITIALIZER
>
>Are empty member initializers something we still need to concern
>ourselves with?  Is LWG issue 265 still pertinent?
> 

According to the defect, the resolution is in the current working paper,
so I don't think you need to worry about it changing. I don't know of
any modern compilers for which the EMPTY_MEM_INITIALIZER.cpp test would
fail.

This all gets back to the discussion we were having a few weeks ago
about which compiler features we should expect the compiler support for
4.3.x.

>Thanks,
>Brad.
>


Empty member initializers

2008-06-10 Thread Eric Lemings
 
>From $TOPDIR/include/rw/_pair.h:
 
 64 // 20.2.2, p2
 65 pair ()
 66 #ifndef _RWSTD_NO_EMPTY_MEM_INITIALIZER
 67 : first (/* lwg issue 265 */), second () { }
 68 #else
 69 // assumes types satisfy the CopyConstructible
requirements
 70 : first (first_type ()), second (second_type ()) { }
 71 #endif   // _RWSTD_NO_EMPTY_MEM_INITIALIZER

Are empty member initializers something we still need to concern
ourselves with?  Is LWG issue 265 still pertinent?
 
Thanks,
Brad.


RE: An internal add_const_reference type trait

2008-06-10 Thread Travis Vitek
 

Eric Lemings wrote:
>
>Travis Vitek wrote:
>> 
>> >Eric Lemings wrote:
>> >
>> >Travis,
>> >
>> >According to our plans for type traits, is this how you 
>> would define an
>> >internal class template that combines the add_const and
>> >add_reference type modifiers?
>> >
>> >#include 
>> >
>> >_RWSTD_NAMESPACE (__rw) {
>> >
>> >template 
>> >class __rw_add_const_ref
>> >{
>> >typedef _TYPENAME __rw_add_const<_TypeT>::type  _ConstT;
>> >
>> >public:
>> >
>> >typedef _TYPENAME __rw_add_reference<_ConstT>::type type;
>> >};
>> >
>> >}   // namespace __rw
>> >
>> 
>> It is really close. I'd probably make it a struct and if 
>there was any
>> complicated logic it would move into an impl struct to reduce 
>> clutter in
>> the outer class.
>> 
>> If you need the above trait, I should let you know that TR1 had
>> add_reference, but C++0x replaces that with add_lvalue_reference and
>> add_rvalue_reference. So it you should probably use the new 
>> names as we
>> probably won't have an __rw_add_reference trait.
>> 
>>  #include 
>> 
>>  _RWSTD_NAMESPACE (__rw) {
>> 
>>  template 
>>  struct __rw_add_const_ref
>>  {
>>  typedef _TYPENAME __rw_add_lval_ref<
>>   _TYPENAME __rw_add_const<_TypeT>::type
>>   >::type type;
>>  };
>> 
>>  }   // namespace __rw
>
>Actually, wouldn't this be even better?
>
>   template 
>   struct __rw_add_const_ref
>   : __rw_add_lval_ref<_RWSTD_ADD_CONST(_TypeT)> { };
>

Ah yes, assuming that I continue to provide the macros. :)


>Brad.
>


RE: An internal add_const_reference type trait

2008-06-10 Thread Eric Lemings
 

> -Original Message-
> From: Travis Vitek [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 10, 2008 10:34 AM
> To: dev@stdcxx.apache.org
> Subject: RE: An internal add_const_reference type trait
> 
>  
> 
> >Eric Lemings wrote:
> >
> >Travis,
> >
> >According to our plans for type traits, is this how you 
> would define an
> >internal class template that combines the add_const and
> >add_reference type modifiers?
> >
> > #include 
> >
> > _RWSTD_NAMESPACE (__rw) {
> >
> > template 
> > class __rw_add_const_ref
> > {
> > typedef _TYPENAME __rw_add_const<_TypeT>::type  _ConstT;
> >
> > public:
> >
> > typedef _TYPENAME __rw_add_reference<_ConstT>::type type;
> > };
> >
> > }   // namespace __rw
> >
> 
> It is really close. I'd probably make it a struct and if there was any
> complicated logic it would move into an impl struct to reduce 
> clutter in
> the outer class.
> 
> If you need the above trait, I should let you know that TR1 had
> add_reference, but C++0x replaces that with add_lvalue_reference and
> add_rvalue_reference. So it you should probably use the new 
> names as we
> probably won't have an __rw_add_reference trait.
> 
>   #include 
> 
>   _RWSTD_NAMESPACE (__rw) {
> 
>   template 
>   struct __rw_add_const_ref
>   {
>   typedef _TYPENAME __rw_add_lval_ref<
>   _TYPENAME __rw_add_const<_TypeT>::type
>   >::type type;
>   };
> 
>   }   // namespace __rw

Actually, wouldn't this be even better?

template 
struct __rw_add_const_ref
: __rw_add_lval_ref<_RWSTD_ADD_CONST(_TypeT)> { };

Brad.


RE: type_traits progress

2008-06-10 Thread Travis Vitek
 

Eric Lemings wrote:
> 
>
> Travis Vitek wrote:
>> 
>...
>> 
>>   rw/_meta_other.h
>> * __rw_enable_if
>> * __rw_conditional
>> 
>> What do you think of this?
>
>Another possibility to consider is grouping them all in a subdir
>of the include/rw directory; e.g., #include .
>
>I figure some C++0x components will need multiple header files
>rather than one or two huge 100k files.  It might make sense for
>such components to add a subdir within the include/rw directory.
>

You're killing me! Just when I thought this thread had died... :)

The discussion up to this point has led me to believe that the best
thing to do is to throw all of the internal trait implementations into a
single file and then separate out traits into their own files only as
necessary. I _really_ don't like this as it makes for one _very_ long
[probably 2000 lines] and messy header. It feels is very 'organic' and
doesn't seem very well planned out at all.

As I posted previously, I'd like to gather similar traits into their own
files. Martin didn't seem very keen on this idea because there was no
rationale for the proposed organization. There were no clear rules as to
what to name the headers and what should be included in each of them.

I'd love to create a rw/meta directory for all of the traits stuff.
Unfortunately this isn't a scheme that we use for any of the other
implementation files, so unless we can come up with an organization
policy, I'm thinking we should probably stick with what we're doing.


>Brad.
>


RE: An internal add_const_reference type trait

2008-06-10 Thread Travis Vitek
 

>Eric Lemings wrote:
>
>Travis,
>
>According to our plans for type traits, is this how you would define an
>internal class template that combines the add_const and
>add_reference type modifiers?
>
>   #include 
>
>   _RWSTD_NAMESPACE (__rw) {
>
>   template 
>   class __rw_add_const_ref
>   {
>   typedef _TYPENAME __rw_add_const<_TypeT>::type  _ConstT;
>
>   public:
>
>   typedef _TYPENAME __rw_add_reference<_ConstT>::type type;
>   };
>
>   }   // namespace __rw
>

It is really close. I'd probably make it a struct and if there was any
complicated logic it would move into an impl struct to reduce clutter in
the outer class.

If you need the above trait, I should let you know that TR1 had
add_reference, but C++0x replaces that with add_lvalue_reference and
add_rvalue_reference. So it you should probably use the new names as we
probably won't have an __rw_add_reference trait.

#include 

_RWSTD_NAMESPACE (__rw) {

template 
struct __rw_add_const_ref
{
typedef _TYPENAME __rw_add_lval_ref<
  _TYPENAME __rw_add_const<_TypeT>::type
  >::type type;
};

}   // namespace __rw

>Also, it'd be nice if you jot down some of these plans for type traits
>on the C++0x Wiki ; e.g., header
>names, internal utilities, TODO work, etc.  ;)

Yes, I know. Given that discussion on the topic has died down I could
actually document what we've arrived at.

>
>Thanks,
>Brad.
>


RE: type_traits progress

2008-06-10 Thread Eric Lemings
 

> -Original Message-
> From: Travis Vitek [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 29, 2008 5:35 PM
> To: dev@stdcxx.apache.org
> Subject: RE: type_traits progress
> 
>  
> 
...
> 
>   rw/_meta_other.h
> * __rw_enable_if
> * __rw_conditional
> 
> What do you think of this?

Another possibility to consider is grouping them all in a subdir
of the include/rw directory; e.g., #include .

I figure some C++0x components will need multiple header files
rather than one or two huge 100k files.  It might make sense for
such components to add a subdir within the include/rw directory.

Brad.


Patch for MinGW

2008-06-10 Thread Farid Zaripov
  I've been working on building stdcxx on MinGW.

  Below is patch for review. An option is hardcode
_RWSTD_CRITICAL_SECTION=_CRITICAL_SECTION and 
_RWSTD_INTERLOCKED_T=long for MinGW
(_RWSTD_CRITICAL_SECTION=_RTL_CRITICAL_SECTION and 
_RWSTD_INTERLOCKED_T=volatile long for MSVC respectively) and don't
recover ATOMIC_OPS.cpp config test.
Suggestions?

  ChangeLog:
  * etc/config/src/ATOMIC_OPS.cpp: Restored config test file, deleted in
rev. 614212.
  Determine type of parameter for InterlockedXXX() function on 32-bit
Windows only.
  Determine type of parameter for EnterCriticalSection() and so on
functions.
  * include/rw/_mutex.h: Replaced _RTL_CRITICAL_SECTION to
  _RWSTD_CRITICAL_SECTION, determined at configure step.
  [!_MSC_VER] Added declarations of Win32 API InterlockedXXX()
functions.
  [!_MSC_VER] Added inline _InterlockedXXX() functions for consistency
with MSVC's intinsics.
  Use __try/__except on MSVC (and ICC/Windows) only.



Index: etc/config/src/ATOMIC_OPS.cpp
===
--- etc/config/src/ATOMIC_OPS.cpp   (revision 665767)
+++ etc/config/src/ATOMIC_OPS.cpp   (working copy)
@@ -22,7 +22,7 @@
  * 
 

**/
 
-#if defined (_WIN32) && !defined (_WIN64)
+#ifdef _WIN32
 
 #include 
 #include 
@@ -30,36 +30,45 @@
 
 extern "C" {
 
-typedef int  __stdcall pfiipv_t (int*);
-typedef int  __stdcall pfiip_t (volatile int*);
 typedef long __stdcall pfllp_t (long*);
 typedef long __stdcall pfllpv_t (volatile long*);
 
+struct _CRITICAL_SECTION;
+struct _RTL_CRITICAL_SECTION;
+
+typedef void __stdcall pfvcsp_t (_CRITICAL_SECTION*);
+typedef void __stdcall pfvrcsp_t (_RTL_CRITICAL_SECTION*);
+
 }   // extern "C"
 
 
-const char* foo (pfiip_t) { return "int"; }
-const char* foo (pfiipv_t) { return "volatile int"; }
-
 const char* foo (pfllp_t) { return "long"; }
 const char* foo (pfllpv_t) { return "volatile long"; }
 
+const char* bar (pfvcsp_t) { return "_CRITICAL_SECTION"; }
+const char* bar (pfvrcsp_t) { return "_RTL_CRITICAL_SECTION"; }
 
+
 int main ()
 {
+#  ifndef _WIN64
 // determine the argument type of InterlockedIncrement()
 // (the type changes from long* to volatile long* depending
-// on the version/patch of MSVC)
-
+// on the version/patch of PlatformSDK headers)
 printf ("#define _RWSTD_INTERLOCKED_T %s\n", foo
(InterlockedIncrement));
+#  endif   // _WIN64
 
+// determine the argument type of EnterCriticalSection()
+// (the type changes from struct _CRITICAL_SECTION to
+// struct _RTL_CRITICAL_SECTION depending on the version/patch of
+// PlatformSDK headers)
+printf ("#define _RWSTD_CRITICAL_SECTION %s\n", bar
(EnterCriticalSection));
+
 return 0;
 }
 
 #else   // not 32-bit Windows
 
-#include 
-
 int main ()
 {
return 0;
Index: include/rw/_mutex.h
===
--- include/rw/_mutex.h (revision 665767)
+++ include/rw/_mutex.h (working copy)
@@ -125,7 +125,7 @@
 #  ifdef _RWSTD_NO_FWD_DECLARATIONS
 
 #include 
-#define _RWSTD_MUTEX_T _RTL_CRITICAL_SECTION
+#define _RWSTD_MUTEX_T _RWSTD_CRITICAL_SECTION
 
 #  else   // if defined (_RWSTD_NO_FWD_DECLARATIONS)
 
@@ -135,20 +135,33 @@
 extern "C" {
 
 // but rather declare these globals here
-struct _RTL_CRITICAL_SECTION;
+struct _RWSTD_CRITICAL_SECTION;
 
 __declspec (dllimport) void __stdcall
-InitializeCriticalSection (_RTL_CRITICAL_SECTION*);
+InitializeCriticalSection (_RWSTD_CRITICAL_SECTION*);
 
 __declspec (dllimport) void __stdcall
-EnterCriticalSection (_RTL_CRITICAL_SECTION*);
+EnterCriticalSection (_RWSTD_CRITICAL_SECTION*);
 
 __declspec (dllimport) void __stdcall
-LeaveCriticalSection (_RTL_CRITICAL_SECTION*);
+LeaveCriticalSection (_RWSTD_CRITICAL_SECTION*);
 
 __declspec (dllimport) void __stdcall
-DeleteCriticalSection (_RTL_CRITICAL_SECTION*);
+DeleteCriticalSection (_RWSTD_CRITICAL_SECTION*);
 
+#if defined (_RWSTD_INTERLOCKED_T) && !defined (_MSC_VER)
+
+__declspec (dllimport) long __stdcall
+InterlockedIncrement (_RWSTD_INTERLOCKED_T*);
+
+__declspec (dllimport) long __stdcall
+InterlockedDecrement (_RWSTD_INTERLOCKED_T*);
+
+__declspec (dllimport) long __stdcall
+InterlockedExchange (_RWSTD_INTERLOCKED_T*, long);
+
+#endif   // _RWSTD_INTERLOCKED_T && !_MSC_VER
+
 }   // extern "C"
 
 _RWSTD_NAMESPACE (__rw) { 
@@ -199,15 +212,40 @@
 #pragma intrinsic (_InterlockedExchange64)
 #  endif   // _RWSTD_MSVC
 #endif   // _M_X64
+#  elif defined (_RWSTD_INTERLOCKED_T)
+
+inline long _InterlockedIncrement (volatile long *__x)
+{
+return InterlockedIncrement (
+_RWSTD_CONST_CAST (_RWSTD_INTERLOCKED_T*, __x));
+}
+
+inline long _InterlockedDecrement (volatile long *__x)
+{
+return InterlockedDecrement (
+_RWSTD_CONST_CAST (_RWSTD_INTERLOCKED_T*, __x));
+}
+
+inline long _Interl

An internal add_const_reference type trait

2008-06-10 Thread Eric Lemings
Travis,

According to our plans for type traits, is this how you would define an
internal class template that combines the add_const and
add_reference type modifiers?

#include 

_RWSTD_NAMESPACE (__rw) {

template 
class __rw_add_const_ref
{
typedef _TYPENAME __rw_add_const<_TypeT>::type  _ConstT;

public:

typedef _TYPENAME __rw_add_reference<_ConstT>::type type;
};

}   // namespace __rw

Also, it'd be nice if you jot down some of these plans for type traits
on the C++0x Wiki ; e.g., header
names, internal utilities, TODO work, etc.  ;)

Thanks,
Brad.


RE: Default BUILDTYPE and/or BUILDMODE?

2008-06-10 Thread Eric Lemings
 

> -Original Message-
> From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
> Sent: Tuesday, June 10, 2008 12:43 AM
> To: dev@stdcxx.apache.org
> Subject: Re: Default BUILDTYPE and/or BUILDMODE?
> 
> Travis Vitek wrote:
> >  
> > 
> >> Eric Lemings wrote:
> >>
> >> What is the default BUILDTYPE if it is not defined in the 
> build (make)
> >> command?
> > 
> > 11s
> 
> Not quite. The default build type is no optimization (no -O),
> no debugging (no -g), and no reentrancy. There's no numeric
> mnemonic for it.

Hmm.  Unless there are objections, I'm inclined to file an enhancement
request to allow building with a default build type (or mode).

Brad.


Re: svn commit: r664141 - in /stdcxx/branches/4.3.x: include/type_traits tests/utilities/20.meta.help.cpp

2008-06-10 Thread Martin Sebor

Travis Vitek wrote:
 


Eric Lemings wrote:

I was wondering if it wouldn't make more sense to move just
the integral_constant class template to its own header?  If
I just need that class template, I wouldn't want to have to
pull in all the other type traits as well.


Yes, I know, but for the time being I'm putting it there. Until I add
more traits this shouldn't be a problem. When I do move this to a
private header it will be transparent to you, so I'll need to notify you
to update your tuple code.


Maybe under include/rw/_integral_constant.h?


Yeah, but you have to keep the 14 character POSIX imposed filename
length into account, so it will probably end up being reduced to
something like `rw/_integ_const.h' or even `rw/_meta_help.h'. 


FWIW, the convention I've used for some of the existing headers
is to have a "base" header (such as _algo.h, or _iterbase.h)
with common definitions used by other library headers, and
another "derived" header with definitions of types that aren't
necessary to implement the rest of the library. Following that
convention, we might have a _traitsbase.h with the definition
of integral_traits and the most commonly used traits.

Martin




Brad.


Author: vitek
Date: Fri Jun  6 14:44:17 2008
New Revision: 664141

URL: http://svn.apache.org/viewvc?rev=664141&view=rev
Log:
2008-06-06  Travis Vitek  <[EMAIL PROTECTED]>

STDCXX-917
* include/type_traits: Add type_traits header that
includes integral_contstant<> implementation.
* tests/utilities/20.meta.help.cpp: Add new test.


Added:
stdcxx/branches/4.3.x/include/type_traits   (with props)
stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp   
(with props)






Re: svn commit: r665784 - in /stdcxx/branches/4.2.x: include/ include/rw/ src/ tests/include/

2008-06-10 Thread Martin Sebor

Farid Zaripov wrote:

-Original Message-
From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
Sent: Tuesday, June 10, 2008 11:00 AM
To: dev@stdcxx.apache.org
Subject: Re: svn commit: r665784 - in /stdcxx/branches/4.2.x: 
include/ include/rw/ src/ tests/include/


[EMAIL PROTECTED] wrote:

Author: faridz
Date: Mon Jun  9 10:13:13 2008
New Revision: 665784

URL: http://svn.apache.org/viewvc?rev=665784&view=rev
Log:
2008-06-09  Farid Zaripov  <[EMAIL PROTECTED]>
Where is the macro _RWSTD_MSVC is #defined? I don't see its 
definition in this patch and I can't find it anywhere else either.


  In this patch:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config.h?
r1=665734&r2=665733&pathrev=665734


Ah! I missed it, thanks. (I'm still plowing through all the email
in my inbox and it's very slow going from where I am.)

Martin



Farid.




RE: svn commit: r665784 - in /stdcxx/branches/4.2.x: include/ include/rw/ src/ tests/include/

2008-06-10 Thread Farid Zaripov
> -Original Message-
> From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
> Sent: Tuesday, June 10, 2008 11:00 AM
> To: dev@stdcxx.apache.org
> Subject: Re: svn commit: r665784 - in /stdcxx/branches/4.2.x: 
> include/ include/rw/ src/ tests/include/
> 
> [EMAIL PROTECTED] wrote:
> > Author: faridz
> > Date: Mon Jun  9 10:13:13 2008
> > New Revision: 665784
> > 
> > URL: http://svn.apache.org/viewvc?rev=665784&view=rev
> > Log:
> > 2008-06-09  Farid Zaripov  <[EMAIL PROTECTED]>
> 
> Where is the macro _RWSTD_MSVC is #defined? I don't see its 
> definition in this patch and I can't find it anywhere else either.

  In this patch:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config.h?
r1=665734&r2=665733&pathrev=665734

Farid.


Re: svn commit: r665784 - in /stdcxx/branches/4.2.x: include/ include/rw/ src/ tests/include/

2008-06-10 Thread Martin Sebor

[EMAIL PROTECTED] wrote:

Author: faridz
Date: Mon Jun  9 10:13:13 2008
New Revision: 665784

URL: http://svn.apache.org/viewvc?rev=665784&view=rev
Log:
2008-06-09  Farid Zaripov  <[EMAIL PROTECTED]>


Where is the macro _RWSTD_MSVC is #defined? I don't see its
definition in this patch and I can't find it anywhere else
either.



* include/rw/_config-msvcrt.h: Move MSVC-specific #pragma from here...
* include/rw/_config-msvc.h: ... to here.
* include/rw/_defs.h: Use dllimport/dllexport attributes on MSVC and 
ICC/Windows only.
* tests/include/rw_testdefs.h: Ditto.
* include/complex: Avoid disabling MSVC-specific warnings on 
ICC/Windows.
* include/string.cc: Ditto.
* include/valarray: Ditto.
* src/file.cpp: Ditto.
* src/iostream.cpp: Ditto.
* src/num_get.cpp: Ditto.
* src/punct.cpp: Ditto.
* src/ti_filebuf.cpp: Ditto.
* src/ti_stringbuf.cpp: Ditto.
* src/ti_wfilebuf.cpp: Ditto.
* src/ti_wstringbuf.cpp: Ditto.
* src/time_put.cpp: Ditto.

Modified:
stdcxx/branches/4.2.x/include/complex
stdcxx/branches/4.2.x/include/rw/_config-msvc.h
stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h
stdcxx/branches/4.2.x/include/rw/_defs.h
stdcxx/branches/4.2.x/include/string.cc
stdcxx/branches/4.2.x/include/valarray
stdcxx/branches/4.2.x/src/file.cpp
stdcxx/branches/4.2.x/src/iostream.cpp
stdcxx/branches/4.2.x/src/num_get.cpp
stdcxx/branches/4.2.x/src/punct.cpp
stdcxx/branches/4.2.x/src/ti_filebuf.cpp
stdcxx/branches/4.2.x/src/ti_stringbuf.cpp
stdcxx/branches/4.2.x/src/ti_wfilebuf.cpp
stdcxx/branches/4.2.x/src/ti_wstringbuf.cpp
stdcxx/branches/4.2.x/src/time_put.cpp
stdcxx/branches/4.2.x/tests/include/rw_testdefs.h

Modified: stdcxx/branches/4.2.x/include/complex
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/complex?rev=665784&r1=665783&r2=665784&view=diff
==
--- stdcxx/branches/4.2.x/include/complex (original)
+++ stdcxx/branches/4.2.x/include/complex Mon Jun  9 10:13:13 2008
@@ -38,13 +38,13 @@
 #include _RWSTD_CMATH
 
 
-#ifdef _MSC_VER

+#ifdef _RWSTD_MSVC
 #  pragma warning (push)
// disable conversion from 'double' to 'float', possible loss of data
// until a conforming  header with float and long double overloads
// for the C functions is provided
 #  pragma warning (disable: 4244)
-#endif   // _MSC_VER
+#endif   // _RWSTD_MSVC
 
 
 _RWSTD_NAMESPACE (std) { 
@@ -854,9 +854,9 @@

 }   // namespace std
 
 
-#ifdef _MSC_VER

+#ifdef _RWSTD_MSVC
 #  pragma warning (pop)
-#endif   // _MSC_VER
+#endif   // _RWSTD_MSVC
 
 
 #if _RWSTD_DEFINE_TEMPLATE (_COMPLEX)


Modified: stdcxx/branches/4.2.x/include/rw/_config-msvc.h
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config-msvc.h?rev=665784&r1=665783&r2=665784&view=diff
==
--- stdcxx/branches/4.2.x/include/rw/_config-msvc.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_config-msvc.h Mon Jun  9 10:13:13 2008
@@ -73,6 +73,10 @@
 // disable "decorated name length exceeded"
 #pragma warning (disable: 4503)
 
+// convert warning "'identifier' used on polymorphic type 'type' with /GR-;"

+// "unpredictable behavior may result" to error
+#pragma warning (error: 4541)
+
 // disable "'identifier' : no suitable definition"
 // "provided for explicit template instantiation request"
 #pragma warning (disable: 4661)

Modified: stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h?rev=665784&r1=665783&r2=665784&view=diff
==
--- stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h Mon Jun  9 10:13:13 2008
@@ -132,7 +132,6 @@
 #  define _RWSTD_NO_DYNAMIC_CAST
 #endif   // _CPPRTTI
 
-#pragma warning (error: 4541)

 #ifndef _NATIVE_WCHAR_T_DEFINED
// define wchar_t if it is not a keyword recognized by the compiler
// (use the /Zc:wchar_t compiler option to enable wchar_t as a keyword)

Modified: stdcxx/branches/4.2.x/include/rw/_defs.h
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_defs.h?rev=665784&r1=665783&r2=665784&view=diff
==
--- stdcxx/branches/4.2.x/include/rw/_defs.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_defs.h Mon Jun  9 10:13:13 2008
@@ -466,11 +466,11 @@
   _RW::__rw_new_capacity(from, what)
 #endif   // HP aCC
 
-// set up Win32/64 DLL export/import directives

+// set up MSVC DLL export/import directives
 // _DLL - defined by the compiler when either -MD or -MDd is used
 // RWDLL - defined for all Rogue Wave(R) products built as shared libs
 // _RWSHA

Re: svn commit: r665796 - in /stdcxx/branches/4.2.x/src: num_put.cpp once.cpp once.h

2008-06-10 Thread Martin Sebor

[EMAIL PROTECTED] wrote:

Author: faridz
Date: Mon Jun  9 10:41:35 2008
New Revision: 665796

URL: http://svn.apache.org/viewvc?rev=665796&view=rev
Log:
2008-06-09  Farid Zaripov  <[EMAIL PROTECTED]>

* src/num_put.cpp [__INTEL_COMPILER && _WIN64] (__rw_put_num): Disable 
icc warning
"conversion may lose significant bits".
* src/once.h [_RWSTD_MSVC] (__rw_once): Add exception specification to 
avoid MSVC
warning "function assumed not to throw an exception but does".
* src/once.cpp [_RWSTD_MSVC] (__rw_once): Ditto.

Modified:
stdcxx/branches/4.2.x/src/num_put.cpp
stdcxx/branches/4.2.x/src/once.cpp
stdcxx/branches/4.2.x/src/once.h

Modified: stdcxx/branches/4.2.x/src/num_put.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/num_put.cpp?rev=665796&r1=665795&r2=665796&view=diff
==
--- stdcxx/branches/4.2.x/src/num_put.cpp (original)
+++ stdcxx/branches/4.2.x/src/num_put.cpp Mon Jun  9 10:41:35 2008
@@ -802,7 +802,13 @@
 case __rw_facet::_C_short:
 case __rw_facet::_C_int:
 case __rw_facet::_C_long:
+#if defined (__INTEL_COMPILER) && defined (_WIN64)


I'd like to see a comment here explaining what's being silenced
and why, as was done for example, in this change (ditto for all
other occurrences of the #pragma):
http://svn.apache.org/viewvc?view=rev&revision=658425


+#  pragma warning (disable: 810)
+#endif
 len = __rw_itoa (buf, _RWSTD_REINTERPRET_CAST (long, pval), flags);
+#if defined (__INTEL_COMPILER) && defined (_WIN64)
+#  pragma warning (default: 810)
+#endif
 break;
 
 case __rw_facet::_C_ushort:

@@ -813,8 +819,14 @@
 // sign is only used in signed conversions; 7.19 6.1, p6
 // of C99: The result of a signed conversion always begins
 // with a plus or minus sign.)
+#if defined (__INTEL_COMPILER) && defined (_WIN64)
+#  pragma warning (disable: 810)
+#endif
 len = __rw_itoa (buf, _RWSTD_REINTERPRET_CAST (unsigned long, pval),
  flags & ~_RWSTD_IOS_SHOWPOS);
+#if defined (__INTEL_COMPILER) && defined (_WIN64)
+#  pragma warning (default: 810)
+#endif
 break;
 
 #ifdef _RWSTD_LONG_LONG


Modified: stdcxx/branches/4.2.x/src/once.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/once.cpp?rev=665796&r1=665795&r2=665796&view=diff
==
--- stdcxx/branches/4.2.x/src/once.cpp (original)
+++ stdcxx/branches/4.2.x/src/once.cpp Mon Jun  9 10:41:35 2008
@@ -111,8 +111,13 @@
 
 
 // implementation that uses atomic operations

+#ifndef _RWSTD_MSVC
 _RWSTD_EXPORT int
 __rw_once (__rw_once_t *once, void (*func)())
+#else
+_RWSTD_EXPORT int
+__rw_once (__rw_once_t *once, void (*func)() throw (...)) throw (...)
+#endif
 {
 _RWSTD_ASSERT (0 != once && 0 != func);
 


Modified: stdcxx/branches/4.2.x/src/once.h
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/once.h?rev=665796&r1=665795&r2=665796&view=diff
==
--- stdcxx/branches/4.2.x/src/once.h (original)
+++ stdcxx/branches/4.2.x/src/once.h Mon Jun  9 10:41:35 2008
@@ -133,9 +133,18 @@
 
 extern "C" {
 
+#ifndef _RWSTD_MSVC

+
 _RWSTD_EXPORT int
 __rw_once (__rw_once_t*, void (*)());
 
+#else


I'd also like to see a comment explaining the declaration below
so that readers don't need to look it up.

Thanks
Martin


+
+_RWSTD_EXPORT int
+__rw_once (__rw_once_t*, void (*)() throw (...)) throw (...);
+
+#endif
+
 }   // extern "C"