Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

From: George Bosilca (bosilca_at_[hidden])
Date: 2007-04-18 12:09:29


It's not only a style issue. There are at least 2 valid reasons to
keep the cast explicit.

1. If [somehow] something goes wrong it's a lot simpler to bash a
fellow developer than send a request for support to one of the
compiler development team.

2. Some compilers don't like the implicit cast. Usually they cope
with the side effects but when the int and long don't have the same
length (which is usually the case on 64 bits architectures) they
generate an error.

So, either we add the explicit cast from the beginning or I will have
to add it next time I compile on Windows ...

   george.

On Apr 18, 2007, at 11:54 AM, Roland Dreier wrote:

>> Because the target variable is an (int).
>
> If I were writing the code, I would leave the cast out. By assigning
> the value to an int variable, you get the same effect anyway, so the
> cast is redundant. And if you ever change the variable to a long, now
> you have to remember to delete the cast too. So I don't see any
> upside to having the cast.
>
> But it's just a minor style issue...
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel



  • application/pkcs7-signature attachment: smime.p7s