Boost logo

Boost :

From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2006-09-26 06:48:24


Toon Knapen <toon.knapen_at_[hidden]> writes:

| When compiling following program against the CVS HEAD:
|
| #include <boost/filesystem/operations.hpp>
| int main()
| {
| boost::filesystem::path p1("foo") ;
| boost::filesystem::path p2("bar") ;
| boost::filesystem::create_symlink(p1,p2) ;
| return 0 ;
| }
|
| I get following warnings with g++ 3.2.3
|
| In file included from foo.cpp:1:
| /home/tk/boost/boost/filesystem/operations.hpp: In function
| `boost::enable_if<boost::filesystem::is_basic_path<Path>, void>::type
| boost::filesystem::create_hard_link(const Path&, const Path&)':
[...]
 
| First of all, what concerns me is that the warning is not correct.
| Nevertheless we can easily make the warning go away by applying the
| patch in attachment (which semantically has no effect at all).
|
| I would therefore like to ask if it would be OK to apply the patch in
| attachment.

Would the warning go away if throw_exception was marked with a gcc
extension "no_return"?

If that is easy to accomplish, then we would have a solution that does
not "pollute" the code. (except at the decl of throw_exception)

boost::throw_exception(...) __attribute__ ((__noreturn__));

-- 
	Lgb

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk