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

Dune flyspray at dune-project.org
Wed Dec 9 15:36:32 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)

----------
If you take a look at the patch, you will see that I made the copy constructor explicit, which disables the copying. The only way to pass the reference is the deprecated cast operator. I did this, because I wouldn't like implicit copying either.

If we're not out for performance, we can decide to allow for implicit copying and simply remove the cast operator. With respect to code correctness, this would keep the status quo. Moreover, it would well suit the semantics of a pointer.

Unfortunately, copying entity pointers seems to be quite expensive. That is why I think that implicit casting (through the copy constructor) should be forbidden and marked this constructor explicit. As I marked the const-cast deprecated, the user can decide what to do about the implicit casts. He can either call the copy constructor explicitly, or he can find another way to avoid the cast (see above).

Now, as detailed above, there is another solution to this problem, which needs a lot more work on the grid implementation part. We have to ask ourselves, if the trouble is worth it. Moreover, there is the pending question, if this would introduce performance impacts. While I personally think so, other seem to disagree.
For me, this boils down to the question: Could somebody implement this solution, so that we can judge the impact?

I would appreciate it, if we could solve this issue as soon as possible.
----------

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

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