[petsc-dev] __func__

Karl Rupp rupp at iue.tuwien.ac.at
Tue Jun 16 21:43:50 CDT 2015


>    Will we lose all stack information on Windows?   That is does the Intel Windows compiler do it right? Does the Microsoft compiler (post 2010) do it right?
> If it is verified that things work ok on Windows then yes it is time to remove them all.

Visual Studio 2012 and older provide __FUNCTION__, but not __func__.
Visual Studio 2013 and younger additionally support __func__:
https://msdn.microsoft.com/en-us/library/b0084kay.aspx

Maybe some fun with Intel compilers older than 12.0:
https://software.intel.com/en-us/articles/treating-func-and-function-as-string-literals

Best regards,
Karli




>> On Jun 16, 2015, at 2:57 PM, Patrick Sanan <patrick.sanan at gmail.com> wrote:
>>
>> This would also be a benefit in that it would increase the information density of the examples that define __FUNCT__ , specifically all the TAO examples.
>>
>> On Tue, Jun 16, 2015 at 2:42 PM, Jed Brown <jed at jedbrown.org> wrote:
>> "Stowell, Mark L." <stowell1 at llnl.gov> writes:
>>> This leads to numerous error messages of the form
>>>
>>> .../petsc-3.6.0/src/dm/impls/da/dageometry.c:643: __FUNCT__="DMDACnvertToCell" does not agree with __func__="DMDAConvertToCell"
>>
>> Both C99 and C++11 defines __func__ (and most pre-C++11 compilers define
>> __func__ and/or __FUNCTION__).  Shall we consider deleting 22328 lines
>> of PETSc by just using those (perhaps with a fallback to a less useful
>> stack trace)?
>>
>




More information about the petsc-dev mailing list