Hello

As far as I remember gccxml (0.9) uses parser from gcc 4.2 which apparently doesn't support stl debug mode (or does it? I've only seen some fragmentary notes around the net, nothing definite)

Consider following example:
#include <list>

namespace nondebug
{
#ifndef _GLIBCXX_DEBUG
using std::list;
#else
using __gnu_norm::list;
#endif
}

void f(nondebug::list<int> const &);

If i use gccxml with -D_GLIBCXX_DEBUG i get:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/c++config.h:1226: error: current namespace 'std' does not enclose strongly used namespace '__gnu_debug_def'

The offending code in c++config.h:

#ifdef _GLIBCXX_DEBUG
# define _GLIBCXX_STD __gnu_norm
# define _GLIBCXX_EXTERN_TEMPLATE 0
namespace __gnu_norm
{
  using namespace std;
}
namespace std
{
  using namespace __gnu_debug_def __attribute__ ((strong)); // here's the error
}
# if __NO_INLINE__ && !__GXX_WEAK__
#  warning debug mode without inlining may fail due to lack of weak symbols
# endif
#else
# define _GLIBCXX_STD std
#endif


Is _GLIBCXX_DEBUG not supported or is it just me? Would upgrading gcc from 4.1 to 4.2 or eg. 4.4 help in such case? Or perhaps namespace nondebug should be defined in some other way? Have anyone succeeded with tweaking c++config.h in gccxml in order to be able to use _GLIBCXX_DEBUG? Any hints?

I use gccxml as a feed for pygccxml/pyplusplus. In my interface there are functions which expect non-debug containers regardless of overall config being used. Turning off _GLIBCXX_DEBUG only for gccxml won't be any good because types get mixed.

regards,
Jakub Zytka

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.gccxml.org/mailman/listinfo/gccxml

Reply via email to