|
Boost Users : |
Subject: Re: [Boost-users] [thread] Getting this warning message with optimization turn on
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2010-01-04 08:15:50
Shiou Ming Lee <shiouming.lee_at_[hidden]> writes:
> Hi, I'm building my program that depends on Boost.thread, but getting following
> warning message, only when compiler's optimization been turn on.
>
> Â Â Â C:/boost_1_41_0/boost/thread/win32/thread_heap_alloc.hpp: In member
> function `bool gUtil::GLog::LogWriterManager::startAsyncLogging(unsigned int)':
> Â Â Â C:/boost_1_41_0/boost/thread/win32/thread_heap_alloc.hpp:156: warning:
> 'heap_memory' might be used uninitialized in this function
This is a really bizarre message. Line 156 is the declaration and
initialization of heap_memory. How it could then be used uninitialized
is beyond me.
> This happens for MinGW 3.4 on Windows Vista SP1 32-bits, but not for GCC 4.4 on
> Fedora 11 x86. The Boost release is of version 1.41.0.
It's win32-specific code, so isn't used on Fedora.
> Any idea what should I do for this warning message? Or should I just leave
> optimization on and ignore this message?
I would leave optimization on and ignore the message.
Anthony
-- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net