[cfe-users] warning call trace?

Bernd Schubert bernd.schubert at itwm.fraunhofer.de
Fri Nov 29 06:33:08 PST 2013


Hi all,

I get for several files in our project a warning similar to this:

>  warning generated.
> In file included from ../source/common/toolkit/StringTk.cpp:1:
> In file included from ../source/common/toolkit/StringTk.h:4:
> In file included from ../source/common/Common.h:15:
> In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/vector:63:
> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_uninitialized.h:75:19: warning: Forming reference to null pointer
>                 std::_Construct(std::__addressof(*__cur), *__first);
>                                 ^~~~~~~~~~~~~~~~~~~~~~~~


Well, that is nice, but which line in StringTk.cpp actually triggers it? 
It prints a trace, but only the include trace and not the line in 
StringTk.cpp that calls std::_Construct.

I fixed/worked-around a similar issue (false positive), which printed an 
include trace within our own code by simply commenting out one possible 
caller after another. Already that took quite some time and I definitely 
don't want to do the same for std-lib callers.


Thanks,
Bernd




More information about the cfe-users mailing list