From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-01-01 17:25:53
"Kris Braun" <kbraun_at_[hidden]> wrote in message
> Hi all,
> When compiling a lexical_cast< int >( foo ) call using MSVC 7.1 with /W4,
I get a C4701 "unreferenced variable" warning. This is because the compiler
doesn't know that the throw_exception function never returns. This warning
can be fixed by adding "__declspec( noreturn )" before "void
throw_exception". I would generate a patch, but I'm unsure how long noreturn
has been supported by the compiler, so I don't know what kind of conditional
Do you mean C4101?
There are more portable ways to suppress unused variable warnings. See:
Also it would be helpful to mention the file name, function and line number
of the unreferenced variable.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk