[petsc-dev] bug in BuildSystem check

Jed Brown jed at 59A2.org
Fri Apr 22 08:28:13 CDT 2011


On Fri, Apr 22, 2011 at 15:20, Barry Smith <bsmith at mcs.anl.gov> wrote:

> > Are you sure?
>
>     Absolutely!   I do not care if it links ok. We cannot use something
> that doesn't have a proper prototype because (1) it spews crap all over a
> PETSc build that worries people (rightly so) and (2) how can you trust the
> link when you don't know how the compiler interpreted the arguments in the
> compile.


There is also the problem that if the prototype is not available, the
argument will be implicitly converted from float to double which may change
it's value. The standard actually requires that "isinf" and relatives be a
macro, the type of the argument is checked and a more specific function
(which may or may not be called isinf, and might be a compiler builtin) is
called.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110422/9e4c90fc/attachment.html>


More information about the petsc-dev mailing list