mrs $ g++-3.3 t7.cc
t7.cc: In constructor `A::A(int)':
t7.cc:11: warning: `A' is deprecated (declared at t7.cc:9)
t7.cc: In constructor `A::A(int)':
t7.cc:11: warning: `A' is deprecated (declared at t7.cc:9)

Yup, right testcase...


To support Panther I defined a MACRO:

# if defined(__GNUC__) && !defined(__INTEL_COMPILER) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
#if defined(__APPLE__) && (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
// Seems like there is a bug in APPLE gcc for deprecated attribute and ctor
// This is fixed in g++ 4.0 (Tiger)
#  define GDCM_LEGACY(method) method
#else
#  define GDCM_LEGACY(method) method __attribute__((deprecated))
#endif
# elif defined(_MSC_VER) && _MSC_VER >= 1300
#  define GDCM_LEGACY(method) __declspec(deprecated) method
# else
#  define GDCM_LEGACY(method) method
# endif
#endif


Basically I am testing if GNU and not APPLE with 'feature' :)

Mathieu

Reply via email to