[Dune] [#674] strict-aliasing warnings with gcc-4.4

Dune dune at dune-project.org
Sat Dec 5 09:39:41 CET 2009


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#674 - strict-aliasing warnings with gcc-4.4
User who did this - Martin Nolte (nolte)

----------
As I see it, we have a few options:

(a) stick to the reinterpret_cast (i.e., don't support gcc-4.4 with strict aliasing)
(b) remove the casts
(c) change the hierarchy EntityPointerImpl contained in EntityPointer -> IteratorImpl contained in Iterator

I think (a) is not an option. The impact of (c) is a heavy decrease in the performance of metagrids (they run into the same problem the facades have now). Moreover, the changes to the implementations would be quite strong. So, as far as I see it, (b) is our only real option. This has some consequences, though:
- EntityPointer &ep = iterator is no longer possible. I don't see any use for this anyway
- const EntityPointer &ep = iterator is still possible, but will create a copy (warning: references to temporaries). Ths could be solved by making the copy constructor from different EntityPointer explicit.
Basically this means that EntityPointers can only be passed by reference using the following construct:
template< class ItImp >
void foo ( const EntityPointer< Grid, ItImp > &ep )
I could live with that.

Still, I have hopes that someone can come up with another idea...
----------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=674#comment1458

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list