On 08/11/2011 10:49 AM, Rainer Orth wrote:
There might be an alternative implementation that is less invasive to the C++ frontend, though: add&& TARGET_DECL_NAMESPACE_STD_P (decl) in write_unscoped_name, defaulting to true, override it in sol2.h (which gets included via tm.h) and have the remaining logic in a new sol2-cxx.c file.
I would be OK with a target hook. I think a cleaner place would be to hook decl_mangling_context and then change write_unscoped_name to use decl_mangling_context instead of CP_DECL_CONTEXT.
Jason
