[petsc-dev] extern "C" anachronism

Barry Smith bsmith at mcs.anl.gov
Sun Nov 7 18:47:29 CST 2010


On Nov 7, 2010, at 2:51 PM, Jed Brown wrote:

> http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/build_arch-opensolaris-cxx-pkgs-opt_n-gage.log
> 
> "vecregall.c", line 43: Warning (Anachronism): Formal argument 4 of type int(*)(_p_Vec*) in call to VecRegister(const char*, const char*, const char*, int(*)(_p_Vec*)) is being passed extern "C" int(*)(_p_Vec*).
> 

  Solaris has been unhappy with this stuff for years.

> And lots of warnings like it.  Is it worth using an extern "C" typedef so that the argument of XXXRegister is labeled extern "C", or is it not worth it?

  I hate those function typedefs since the code is less clear and you need to hunt around for the definition so try to avoid them as much as possible.

  I'm happy to keep this warning in.

   Barry

> 
> Jed




More information about the petsc-dev mailing list