From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13927 invoked by alias); 4 Feb 2012 02:13:11 -0000 Received: (qmail 13918 invoked by uid 22791); 4 Feb 2012 02:13:10 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 04 Feb 2012 02:12:57 +0000 From: "richard-gccbugzilla at metafoo dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/52119] numeric_limits::min() is not a constant expression Date: Sat, 04 Feb 2012 02:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: richard-gccbugzilla at metafoo dot co.uk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg00452.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52119 Richard Smith changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |richard-gccbugzilla at | |metafoo dot co.uk --- Comment #1 from Richard Smith 2012-02-04 02:12:41 UTC --- In more detail: Under the C++11 FDIS, this is not a (core) constant express= ion due to the "=E2=80=94 a result that is not mathematically de=EF=AC=81ned or= not in the range of representable values for its type;" bullet in [expr.const]p2. Under DR1313, that rule is generalized to all undefined behavior. And a constexpr function which can't produce a constant expression is ill-formed by [dcl.constexpr]p= 5.