public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/38278]  New: C++ namespace collision
@ 2008-11-26 15:32 holger dot hopp at sap dot com
  2008-11-26 17:09 ` [Bug c++/38278] [4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: holger dot hopp at sap dot com @ 2008-11-26 15:32 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-28 22:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
2008-11-26 17:09 ` [Bug c++/38278] [4.4 Regression] " rguenth at gcc dot gnu dot org
2008-11-27 10:30 ` jakub at gcc dot gnu dot org
2008-11-27 17:41 ` jsm28 at gcc dot gnu dot org
2008-11-27 17:45 ` jsm28 at gcc dot gnu dot org
2008-11-28 14:45 ` jason at gcc dot gnu dot org
2008-11-28 21:26 ` jason at gcc dot gnu dot org
2008-11-28 22:16 ` jason at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).