|
Boost Users : |
Subject: Re: [Boost-users] [thread] Getting this warning message with optimization turn on
From: Shiou Ming Lee (shiouming.lee_at_[hidden])
Date: 2010-01-07 06:25:28
On Mon, Jan 4, 2010 at 9:30 PM, mike marchywka <marchywka_at_[hidden]> wrote:
> On 1/4/10, Anthony Williams <anthony.ajw_at_[hidden]> wrote:
> > 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've seen spurious optimization related messages in two scenarioes.
> Some compilers only notice
> when optimization is turned on and it is worthwhile to investigate.
> Other times they optimize away
> some code and then complain that it is missing. Is the latter possible?
>
Is there any way I can tell to which case it belongs? Sorry as I'm not
familiar with things like compiler and optimization.
>
>
> > 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 mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> --
> marchywka_at_[hidden]
> note new address 2009-12-16:
> Mike Marchywka
> 1975 Village Round
> Marietta GA 30064
> 415-264-8477 (w)<- use this
> 404-788-1216 (C)<- leave message
> 989-348-4796 (P)<- emergency only
> marchywka_at_[hidden]
> Note: If I am asking for free stuff, I normally use for hobby/non-profit
> information but may use in investment forums, public and private.
> Please indicate any concerns if applicable.
> Note: hotmail is censoring incoming mail using random criteria beyond
> my control and often hangs my browser
> but all my subscriptions are here..., try also marchywka_at_[hidden]
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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