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 2008/06/10 09:50:13 UTC

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

faridz@apache.org 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  <fa...@epam.com>
> 
> 	* 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"
>  
>  
> 
>