I've got following namespace collision with gcc trunk rev. 142220.
It works for gcc <= 4.3 and trunk rev. <= 142038.

$ gcc-4.4 -c tst.c
tst.c:8: error: declaration of 'static __number
_Numeric_limits_base<__number>::min()'
tst.c:2: error: changes meaning of 'min' from 'const _Tp& min(const _Tp&, const
_Tp&)'
Exit 1

// source:
template <class _Tp>
inline const _Tp& (min)(const _Tp& __a, const _Tp& __b) { return __b < __a ?
__b : __a; }

template <class __number>
class _Numeric_limits_base {
public:

  static __number ( min)() { return __number(); }
};


-- 
           Summary: C++ namespace collision
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: holger dot hopp at sap dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278

Reply via email to