$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-01-01 17:25:53
"Kris Braun" <kbraun_at_[hidden]> wrote in message
news:3B66AF4BC3B70B4496229C5F29C577C00DB133_at_XCH26YKF.rim.net...
> 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
to use.
Do you mean C4101?
There are more portable ways to suppress unused variable warnings. See:
http://listarchives.boost.org/MailArchives/boost/msg28060.php.
Also it would be helpful to mention the file name, function and line number
of the unreferenced variable.
Jonathan