It sounds like a header you are including must be doing something similar to this bug and defining __func__
as follows:
define __func__ "<unknown>"
and so you only see it when you include that header(s). A quick way to test for this would be to use __FUNCTION__
in a section of the code where __func__
does not work. Then you need to narrow it down and figure out which header has the troublesome logic and fix it.