stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Black <>
Subject Re: __rw_once warnings in non-reentrant Windows builds?
Date Tue, 16 Oct 2007 14:45:16 GMT
I'm not certain this is relevant, but MSVC 8.0 doesn't support
non-reentrant builds, at least where compiler switches are concerned.
(MSVC 7.1 did support non-reentrant builds, but only when linked
statically).  By compiler switches, I'm referencing the /ML(d), /MT(d),
and /MD(d) family of switches.  I believe these switches control which C
runtime library is used in linking.

--Andrew Black

Martin Sebor wrote:
> In a manual 11d build I just did with MSVC 8.0 I'm seeing warning
> C4297: 'function assumed not to throw an exception but does' for
> __rw_once(). When I double-click on the warning in the debugger
> output window it brings up the definition of __rw_once() that's
> guarded by #ifdef _RWSTD_REENTRANT (it points to line 133 in
> once.cpp), but the function text is grayed out, presumably because
> the block of code is not included. This doesn't seem to make sense.
> Why would the compiler give a warning for a function that's not
> even compiled? OTOH, if it is being compiled in this build type,
> it seems we have a problem (11d is not supposed to be reentrant).
> Does any of you Visual Studio gurus have idea what's going on?
> Martin

View raw message