incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: ios_bits.cpp and MSVC
Date Thu, 25 Oct 2007 14:28:27 GMT
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Wednesday, October 24, 2007 8:58 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: ios_bits.cpp and MSVC
> 
> Farid Zaripov wrote:
> >   I'm working on STDCXX-437 issue and I've removed almost 
> all MSVC 6.0 
> > code, but I found some #if expression that I don't understand.
> > 
> > 
> > src/ios_bits.cpp, line 84
> > --------------------
> > #if !defined (_MSC_VER) || (_MSC_VER <= 1300)
> > 
> > _RWSTD_DEFINE_STATIC_CONST (const ios_base::seekdir ios_base::beg); 
> > _RWSTD_DEFINE_STATIC_CONST (const ios_base::seekdir ios_base::cur); 
> > _RWSTD_DEFINE_STATIC_CONST (const ios_base::seekdir ios_base::end);
> > 
> > #endif // !defined (_MSC_VER) || (_MSC_VER <= 1300)
> > --------------------
> > 
> >   This part of code used only on non-MSVC and MSVC <= 7.0.
> > So these lines are excluded only on MSVC > 7.0. Why?
> 
> I suspect it's a workaround for the following bug that first 
> appeared in MSVC 7.0:
> http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.asp
> x?feedbackid=b9853206-740a-47e7-af09-b03b51934a97
> 
> The Microsoft Feedback site gives me an error again when I 
> try to access the page but I copied the issue from the Rogue 
> Wave bug tracking database where we keep track of it to STDCXX-613:
> 
> http://issues.apache.org/jira/browse/STDCXX-613

  This bug avoided in _defs.h:

_defs.h, line 1020:
-----------
#  ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
#    define _RWSTD_DEFINE_STATIC_CONST(decl)   decl
#  else   // if defined (_RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION)
     // disable defintion of static const integral members
     // to work around compiler bugs such as those in MSVC
     // or Intel C++/Windows that cause multiple definition
     // linker errors (see PR #26562 and #30260)
#    define _RWSTD_DEFINE_STATIC_CONST(ignore)   /* empty */
#  endif   // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
-----------

  I've commented the #if !defined (_MSC_VER) || (_MSC_VER <= 1300)
and corresponding #endif lines in ios_bits.cpp, and the test shows no
any errors.

Farid.

Mime
View raw message