problems wrapping <cstd*> functions in mudflap

Frank Ch. Eigler fche@redhat.com
Tue Oct 28 22:45:00 GMT 2003


Hi -

mudflap is a pointer-use-checking extension plus runtime in the
tree-ssa compiler branch.  Among other things, it provides checked
versions of standard C functions like strlen, malloc, etc, some of
these interposed via macros that do roughly

  #undef strlen
  #define strlen checked_strlen

at the beginning of the compilation unit.

This works okay with C code, but most C++ code ends up including
the cstdlib etc. headers, which undo this #define and result in
errors like

  /../../include/c++/3.5-tree-ssa/cstring:95: error: `::strlen' has not been declared

The two wrapping mechanisms are in conflict with each other.
Has this sort of conflict come up before in libstdc++-v3 land?


- FChE



More information about the Libstdc++ mailing list