[petsc-dev] When __FUNCT__ is wrong
Barry Smith
bsmith at mcs.anl.gov
Sun Aug 29 12:25:31 CDT 2010
On Aug 29, 2010, at 12:20 PM, Jed Brown wrote:
> On Sat, 28 Aug 2010 18:30:50 -0500, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> This may not work properly for our weird "templated" functions in .h
>> files for SOR for SBAIJ etc and for VecScatter.
>
> I fixed the vpscat.h templated functions, and never got warnings from
> others.
>
>> I'd like to keep using out macro for now and only use the compiler
>> version for checking.
>
> I strongly prefer to use the compiler-provided definition on systems
> that support it because then traces (from errors and -malloc_dump)
> through user code will have the correct names (instead of the much less
> useful "User provided function"). Why would you want to use __FUNCT__
> even though the compiler has it's own definition?
I guess I don't have a good reason. So long as it is robust then I guess using the compiler versions is fine.
Barry
>
>> Then in the releases we don't have Jed's check so it doesn't bother
>> people.
>
> I don't really care one way or the other about leaving the check on for
> releases. If they never redefine __FUNCT__, then they won't see any
> warnings because it will still be "User provided function". If they are
> redefining __FUNCT__, it probably means that they want more informative
> traces and would appreciate being notified when they are incorrect.
>
> Jed
More information about the petsc-dev
mailing list