[petsc-dev] Compliant C89
Barry Smith
bsmith at mcs.anl.gov
Mon Jan 14 13:29:03 CST 2013
On Jan 14, 2013, at 1:00 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Mon, Jan 14, 2013 at 12:57 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> Ok, I didn't realize inline functions can't be called in a declaration.
>
> In C89, it can't, but most compilers will happily allow it. But if we changed to an inline function, we would have to change the prototype to properly return an error, i.e.,
>
> PetscErrorCode PetscBLASIntCast(PetscInt,PetscBLASInt*);
Ugly…. man, but I guess the right thing to do.
Barry
>
> which obviously cannot be called in a declaration. It's syntactically heavier, but more honest about what really happens.
>
>
> If that is the case then I am fine with changing to an inline and thus forcing it always out of declarations.
>
>
More information about the petsc-dev
mailing list