public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54968] New: spurious constexpr error, 20_util/tuple/comparison_operators/35480_neg.cc
@ 2012-10-18  8:15 bkoz at gcc dot gnu.org
  2014-11-17 20:44 ` [Bug c++/54968] " jason at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: bkoz at gcc dot gnu.org @ 2012-10-18  8:15 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54968
           Summary: spurious constexpr error,
                    20_util/tuple/comparison_operators/35480_neg.cc
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bkoz@gcc.gnu.org


Created attachment 28477
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28477
pre-processed test

While finishing up the latest constexpr hacking, I noticed that tuple's
relational operators now give a bogus excess error:

FAIL: 20_util/tuple/comparison_operators/35480_neg.cc (test for excess errors)
Excess errors:
/mnt/share/bld/gcc.git-trunk/x86_64-unknown-linux-gnu/libstdc++-v3/include/tuple:824:5:
error: body of constexpr function 'constexpr bool std::operator<(const
std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&) [with _TElements
= {int}; _UElements = {int, int}]' not a return-statement
/mnt/share/bld/gcc.git-trunk/x86_64-unknown-linux-gnu/libstdc++-v3/include/tuple:813:5:
error: body of constexpr function 'constexpr bool std::operator==(const
std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&) [with _TElements
= {int}; _UElements = {int, int}]' not a return-statement


but this seems unlikely, given:

  template<typename... _TElements, typename... _UElements>
    constexpr bool
    operator==(const tuple<_TElements...>& __t,
           const tuple<_UElements...>& __u)
    {
      typedef tuple<_TElements...> _Tp;
      typedef tuple<_UElements...> _Up;
      return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value,
          0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u));
    }

and more importantly, the passing of the positive test here:
libstdc++-v3/testsuite/20_util/tuple/comparison_operators/constexpr.cc

Reasonable people may disagree, and hey, it's late.


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

* [Bug c++/54968] spurious constexpr error, 20_util/tuple/comparison_operators/35480_neg.cc
  2012-10-18  8:15 [Bug c++/54968] New: spurious constexpr error, 20_util/tuple/comparison_operators/35480_neg.cc bkoz at gcc dot gnu.org
@ 2014-11-17 20:44 ` jason at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: jason at gcc dot gnu.org @ 2014-11-17 20:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54968

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
When compiling with trunk this error follows another error:

/mnt/share/bld/gcc.git-trunk/x86_64-unknown-linux-gnu/libstdc++-v3/include/tuple:823:52:
error: incomplete type ‘std::__tuple_compare<18446744073709551615ul, 0ul, 1ul,
std::tuple<int>, std::tuple<int, int> >’ used in nested name specifier

and that test now passes, so I'm just going to close this BZ.

(hi, bkoz!)
>From gcc-bugs-return-467076-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 17 20:44:22 2014
Return-Path: <gcc-bugs-return-467076-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29850 invoked by alias); 17 Nov 2014 20:44:22 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29807 invoked by uid 48); 17 Nov 2014 20:44:18 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55004] [meta-bug] constexpr issues
Date: Mon, 17 Nov 2014 20:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: meta-bug
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-55004-4-5L1GgCNnl9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55004-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55004-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg01548.txt.bz2
Content-length: 498

https://gcc.gnu.org/bugzilla/show_bug.cgi?idU004
Bug 55004 depends on bug 54968, which changed state.

Bug 54968 Summary: spurious constexpr error, 20_util/tuple/comparison_operators/35480_neg.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?idT968

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID


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

end of thread, other threads:[~2014-11-17 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18  8:15 [Bug c++/54968] New: spurious constexpr error, 20_util/tuple/comparison_operators/35480_neg.cc bkoz at gcc dot gnu.org
2014-11-17 20:44 ` [Bug c++/54968] " jason at gcc dot gnu.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).