
"g++" -c -DBOOST_THREAD_LIB_NAME=boost_thread -DBOOST_THREAD_BUILD_LIB=1 -g -O0 -fno-inline -pthread -Wall -ftemplate-depth-255 -I"bin/boost/libs/thread/build" -I "/usr/local/src/boost.cvs" -o "bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/once.o" "/usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp" /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp: In function `void boost::call_once(void (*)(), boost::once_flag&)': /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:152: error: `ostringstream' is not a member of `std' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:152: error: expected `;' before "strm" /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:153: error: `strm' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:154: error: `hex' is not a member of `std' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:155: error: `GetCurrentProcessId' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:157: error: `HANDLE' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:157: error: expected `;' before "mutex" /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:160: error: `mutex' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:163: error: `INFINITE' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:163: error: `WaitForSingleObject' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:164: error: `WAIT_OBJECT_0' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:166: error: `compare_exchange' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:174: error: `ReleaseMutex' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:176: error: `CloseHandle' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:174: warning: unused variable 'ReleaseMutex' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:176: warning: unused variable 'CloseHandle' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:180: error: `InterlockedExchange' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:180: warning: unused variable 'InterlockedExchange' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:166: warning: unused variable 'compare_exchange' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:183: error: `ReleaseMutex' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:185: error: `CloseHandle' was not declared in this scope /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:153: warning: unused variable 'strm' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:155: warning: unused variable 'GetCurrentProcessId' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:157: warning: unused variable 'HANDLE' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:163: warning: unused variable 'INFINITE' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:163: warning: unused variable 'WaitForSingleObject' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:164: warning: unused variable 'WAIT_OBJECT_0' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:183: warning: unused variable 'ReleaseMutex' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:185: warning: unused variable 'CloseHandle' /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:188:2: #elif without #if /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp: At global scope: /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:189: error: expected constructor, destructor, or type conversion before '(' token /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:190: error: expected constructor, destructor, or type conversion before '(' token /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:191: error: expected constructor, destructor, or type conversion before '(' token /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:192:2: #elif without #if /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:193: error: expected unqualified-id before "if" /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:201:2: #endif without #if /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:204: error: expected declaration before '}' token /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:56: warning: 'void key_init()' defined but not used /usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp:61: warning: 'void do_once()' defined but not used ...failed gcc-C++-action bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/once.o... .

Neal Becker schrieb:
"g++" -c -DBOOST_THREAD_LIB_NAME=boost_thread -DBOOST_THREAD_BUILD_LIB=1 -g -O0 -fno-inline -pthread -Wall -ftemplate-depth-255 -I"bin/boost/libs/thread/build" -I "/usr/local/src/boost.cvs" -o "bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/once.o" "/usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp"
Which toolset? Which version? HEAD/RC_1_34_0/thread_rewrite ? Roland

Roland Schwarz wrote:
Neal Becker schrieb:
"g++" -c -DBOOST_THREAD_LIB_NAME=boost_thread -DBOOST_THREAD_BUILD_LIB=1 -g -O0 -fno-inline -pthread -Wall -ftemplate-depth-255 -I"bin/boost/libs/thread/build" -I "/usr/local/src/boost.cvs" -o "bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/once.o" "/usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp"
Which toolset? -sTOOLS=gcc Which version? HEAD/RC_1_34_0/thread_rewrite ? HEAD

Neal Becker wrote:
Roland Schwarz wrote:
Neal Becker schrieb:
"g++" -c -DBOOST_THREAD_LIB_NAME=boost_thread -DBOOST_THREAD_BUILD_LIB=1 -g -O0 -fno-inline -pthread -Wall -ftemplate-depth-255 -I"bin/boost/libs/thread/build" -I "/usr/local/src/boost.cvs" -o "bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/once.o" "/usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp"
Which toolset? -sTOOLS=gcc Which version? HEAD/RC_1_34_0/thread_rewrite ? HEAD
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost Index: once.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/thread/src/once.cpp,v retrieving revision 1.25 diff -c -r1.25 once.cpp *** once.cpp 10 Oct 2006 07:34:37 -0000 1.25 --- once.cpp 12 Oct 2006 14:22:06 -0000
*** 139,145 **** << std::ends; unfreezer unfreeze(strm); HANDLE mutex=new_mutex(strm.str()); ! # endif #else # if defined (BOOST_NO_ANSI_APIS) std::wostringstream strm; --- 139,145 ---- << std::ends; unfreezer unfreeze(strm); HANDLE mutex=new_mutex(strm.str()); ! //# endif #else # if defined (BOOST_NO_ANSI_APIS) std::wostringstream strm;

Neal Becker wrote:
=================================================================== RCS file: /cvsroot/boost/boost/libs/thread/src/once.cpp,v retrieving revision 1.25 diff -c -r1.25 once.cpp *** once.cpp 10 Oct 2006 07:34:37 -0000 1.25 --- once.cpp 12 Oct 2006 14:22:06 -0000
.... <snipped> ... Sorry, but I am alittle short of time at the moment. Can you please be a little more explicit? I guess you want to tell me that this change introduced the problem? True? If so, you'll need to address Anthony Williams who checked in this change. I personally will not have time to look into this before tomorrow. Please use the previous version until this has been investigated. Thanks for having reported though. Roland

Neal Becker <ndbecker2@gmail.com> writes:
Neal Becker wrote:
Roland Schwarz wrote:
Neal Becker schrieb:
"g++" -c -DBOOST_THREAD_LIB_NAME=boost_thread -DBOOST_THREAD_BUILD_LIB=1 -g -O0 -fno-inline -pthread -Wall -ftemplate-depth-255 -I"bin/boost/libs/thread/build" -I "/usr/local/src/boost.cvs" -o "bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/once.o" "/usr/local/src/boost.cvs/libs/thread/build/../src/once.cpp"
Which toolset? -sTOOLS=gcc Which version? HEAD/RC_1_34_0/thread_rewrite ? HEAD
Thanks for the notify/patch. I thought I'd deleted that #endif; it must have crept back in before I checked in. Fixed now. Anthony -- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk

Neal Becker wrote:
-sTOOLS=gcc
Which version? HEAD/RC_1_34_0/thread_rewrite ? HEAD
Hmm, this is the cygwin chain. Does this also happen with mingw? Unfortunately no one runs gcc regressions with this compiler on windows. I am not even sure if it is expected on windows to tear in the WINAPI functions when running on cygwin. It appears as if this is the case. Roland

Roland Schwarz wrote:
Does this also happen with mingw?
Yes. I still get errors with MinGW: E:\libs\boost\libs\thread\src\mutex.inl: In function `void* <unnamed>::new_critical_section()': E:\libs\boost\libs\thread\src\mutex.inl:51: error: `thread_resource_error' is not a member of `boost' E:\libs\boost\libs\thread\src\mutex.inl:57: error: `thread_resource_error' is not a member of `boost' E:\libs\boost\libs\thread\src\mutex.inl: In function `void* <unnamed>::new_mutex(const char*)': E:\libs\boost\libs\thread\src\mutex.inl:72: error: `thread_resource_error' is not a member of `boost' Looks like boost/thread/exceptions.hpp should be included in once.cpp when BOOST_HAS_WINTHREADS is defined. BTW, shouldn't the line in mutex.inl that reads OSVERSIONINFO version_info = {sizeof(OSVERSIONINFO)}; be replaced with OSVERSIONINFO version_info; version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); ? Would get rid of the following warnings: In file included from E:\libs\boost\libs\thread\src\once.cpp:21: E:\libs\boost\libs\thread\src\mutex.inl: In function `void <unnamed>::init_TryEnterCriticalSection()': E:\libs\boost\libs\thread\src\mutex.inl:20: warning: missing initializer for member `_OSVERSIONINFOA::dwMajorVersion' E:\libs\boost\libs\thread\src\mutex.inl:20: warning: missing initializer for member `_OSVERSIONINFOA::dwMinorVersion' E:\libs\boost\libs\thread\src\mutex.inl:20: warning: missing initializer for member `_OSVERSIONINFOA::dwBuildNumber' E:\libs\boost\libs\thread\src\mutex.inl:20: warning: missing initializer for member `_OSVERSIONINFOA::dwPlatformId' E:\libs\boost\libs\thread\src\mutex.inl:20: warning: missing initializer for member `_OSVERSIONINFOA::szCSDVersion' -- Daniel Schlyder

Daniel Schlyder wrote:
BTW, shouldn't the line in mutex.inl that reads
OSVERSIONINFO version_info = {sizeof(OSVERSIONINFO)};
This is an idiomatic way to initialize the first member to sizeof(OSVERSIONINFO) and the rest to zero.
be replaced with
OSVERSIONINFO version_info; version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
This initializes dwOSVersionInfoSize to sizeof(OSVERSIONINFO) and leaves the rest uninitialized.

Peter Dimov wrote:
Daniel Schlyder wrote:
BTW, shouldn't the line in mutex.inl that reads
OSVERSIONINFO version_info = {sizeof(OSVERSIONINFO)};
This is an idiomatic way to initialize the first member to sizeof(OSVERSIONINFO) and the rest to zero.
Ah, ok. So GCC shouldn't emit those missing initializer warnings. Would be nice to silence them anyway, though. Maybe using OSVERSIONINFO version_info = {sizeof(OSVERSIONINFO), 0, 0, 0, 0, 0}; ?
be replaced with
OSVERSIONINFO version_info; version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
This initializes dwOSVersionInfoSize to sizeof(OSVERSIONINFO) and leaves the rest uninitialized.
Not a problem if the return value of GetVersionEx() is checked. -- Daniel Schlyder

Daniel Schlyder <daniel@bitblaze.com> writes:
Roland Schwarz wrote:
Does this also happen with mingw?
Yes. I still get errors with MinGW:
E:\libs\boost\libs\thread\src\mutex.inl: In function `void* <unnamed>::new_critical_section()': E:\libs\boost\libs\thread\src\mutex.inl:51: error: `thread_resource_error' is not a member of `boost' E:\libs\boost\libs\thread\src\mutex.inl:57: error: `thread_resource_error' is not a member of `boost' E:\libs\boost\libs\thread\src\mutex.inl: In function `void* <unnamed>::new_mutex(const char*)': E:\libs\boost\libs\thread\src\mutex.inl:72: error: `thread_resource_error' is not a member of `boost'
I fixed that, yesterday, too.
BTW, shouldn't the line in mutex.inl that reads
OSVERSIONINFO version_info = {sizeof(OSVERSIONINFO)};
be replaced with
OSVERSIONINFO version_info; version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
No. gcc shouldn't be warning about that. Anthony -- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk

Anthony Williams wrote:
No. gcc shouldn't be warning about that.
gcc (mingw) also is warning about some other things which are harmless: once.cpp:157: 'mutex' might be used uninitialized in this function thread.cpp:119: unused variable 'guard' Perhaps we should suppress them? Roland
participants (5)
-
Anthony Williams
-
Daniel Schlyder
-
Neal Becker
-
Peter Dimov
-
Roland Schwarz