Re: [eigen] exception specifications... |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] exception specifications...
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Sat, 17 Apr 2010 16:14:27 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type :content-transfer-encoding; bh=uQUluCDSAOUFLZR1jR4WKpYuhalqzXihD4SSznTl5sU=; b=kcx4ZqaCQbFBmyURC/ar+R1jbxF7XOmeELbF6K3bqiF8y1WQJUZMFQ/qXCQBgD63sd J1p7qtPHHEmNzVetO7DMz2Eplo4+m2k6JUCr3n4o8CghAILHoUyYDIrbSV9J5UvN5pXf aOX/6Dl9P6MoT76otVo9ZkK634IO+1qo5Km4w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=D9JPC+fYHDBy1cKagDMhV3DuWUMGBXM10I3oHoODaloSQ42Zi0QYgFYyBM2yxtmvJV ctlP6lExf6kKVcE5uuHsCSeaoZjFKAXJBSPBwKqvpp9o/yiYLDmrr7AoNYCO9DuXNI/y uAdvqIlrDrVP4msnzo5MmQSeegYoyHg4gfK/Q=
I wanted to bring up this discussion once more in order to finish it... ;)
On Mon, Mar 15, 2010 at 4:10 AM, leon zadorin <leonleon77@xxxxxxxxx> wrote:
> On 3/14/10, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>
>> I thought it might be a good idea to remove the throw() declarations
>
> For as long as you retain your lib as 'header-only' one (i.e. no
> shared lib files) -- with using extern/global functions et al, the
> explicit "throw()" qualifier allows some compilers to optimize things
> that they otherwise would/could not...
>
> For instance, from:
> http://gcc.gnu.org/gcc-4.1/changes.html
> we have:
> "
> When generating code for a shared library, GCC now recognizes that
> global functions may be replaced when the program runs. Therefore, it
> is now more conservative in deducing information from the bodies of
> functions. For example, in this example:
>
> void f() {}
> void g() {
> try { f(); }
> catch (...) {
> cout << "Exception";
> }
> }
>
> G++ would previously have optimized away the catch clause, since it
> would have concluded that f cannot throw exceptions. Because users may
> replace f with another function in the main body of the program, this
> optimization is unsafe, and is no longer performed. If you wish G++ to
> continue to optimize as before, you must add a throw() clause to the
> declaration of f to make clear that it does not throw exceptions.
> "
So, does it mean we want to keep stuff or should we follow the advices
given by the boost devs and/or H. Sutter!?
In case you insist of sticking to throw(), I can finally remove the
code I have in my repository.
- Hauke