This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/52119] numeric_limits::min() is not a constant expression


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-04
     Ever Confirmed|0                           |1

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-02-04 09:58:38 UTC ---
The problematic macro is extremely old. Using

#define __glibcxx_min(T) \
  (__glibcxx_signed (T) ? -__glibcxx_max(T) - 1 : (T)0)

seems indeed ok to me. Did you actually test it with clang?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]