From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IU/II5sycl9ELQAAWB0awg (envelope-from ) for ; Mon, 28 Sep 2020 14:59:39 -0400 Received: by simark.ca (Postfix, from userid 112) id 7FFCA1E591; Mon, 28 Sep 2020 14:59:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9E4461E58E for ; Mon, 28 Sep 2020 14:59:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A0323950C2A; Mon, 28 Sep 2020 18:59:38 +0000 (GMT) Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id D71733861830 for ; Mon, 28 Sep 2020 18:59:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D71733861830 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 9BC9F116B37; Mon, 28 Sep 2020 14:59:35 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id n9KxD6gEHscv; Mon, 28 Sep 2020 14:59:35 -0400 (EDT) Received: from murgatroyd (97-118-100-18.hlrn.qwest.net [97.118.100.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 4941411682C; Mon, 28 Sep 2020 14:59:35 -0400 (EDT) From: Tom Tromey To: Pedro Alves Subject: Re: [PATCH 1/3] Rewrite valid-expr.h's internals in terms of the detection idiom (C++17/N4502) References: <20200821144523.19451-1-pedro@palves.net> <20200821144523.19451-2-pedro@palves.net> X-Attribution: Tom Date: Mon, 28 Sep 2020 12:59:34 -0600 In-Reply-To: <20200821144523.19451-2-pedro@palves.net> (Pedro Alves's message of "Fri, 21 Aug 2020 15:45:21 +0100") Message-ID: <87mu19hgmh.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" >>>>> "Pedro" == Pedro Alves writes: Pedro> + static_assert (gdb::is_detected_exact + archetype, TYPES>::value == VALID, \ Pedro> ""); \ I'm not sure if it was exactly this patch, but after I merged this code to our internal tree, we started having build problems on a machine that uses GCC 6.4. I've appended the error message. I'm not sure it is worth doing anything about this, but I thought it would be worth noting in case anybody else winds up in this situation. Tom ../../src/gdb/unittests/offset-type-selftests.c: In substitution of 'template class Op, class ... Args> using is_detected_exact = std::is_same::type> [with Expected = selftests::offset_type::off_A&; Op = selftests::offset_type::check_valid_expr75::archetype; Args = {selftests::offset_type::off_A, selftests::offset_type::off_B}]': ../../src/gdb/unittests/offset-type-selftests.c:75:1: required from here ../../src/gdb/../gdbsupport/valid-expr.h:65:20: error: type/value mismatch at argument 2 in template parameter list for 'template class Op, class ... Args> using is_detected_exact = std::is_same::type>' archetype, TYPES>::value == VALID, \ ^ ../../src/gdb/../gdbsupport/valid-expr.h:79:3: note: in expansion of macro 'CHECK_VALID_EXPR_INT' CHECK_VALID_EXPR_INT (ESC_PARENS(typename T1, typename T2), \ ^~~~~~~~~~~~~~~~~~~~ ../../src/gdb/unittests/offset-type-selftests.c:42:3: note: in expansion of macro 'CHECK_VALID_EXPR_2' CHECK_VALID_EXPR_2 (off_A, off_B, VALID, EXPR_TYPE, EXPR) ^~~~~~~~~~~~~~~~~~ ../../src/gdb/unittests/offset-type-selftests.c:75:1: note: in expansion of macro 'CHECK_VALID' CHECK_VALID (true, off_A&, lval_a += undrl {}); ^~~~~~~~~~~ ../../src/gdb/../gdbsupport/valid-expr.h:65:20: note: expected a class template, got 'selftests::offset_type::check_valid_expr75::archetype' archetype, TYPES>::value == VALID, \ ^ ../../src/gdb/../gdbsupport/valid-expr.h:79:3: note: in expansion of macro 'CHECK_VALID_EXPR_INT' CHECK_VALID_EXPR_INT (ESC_PARENS(typename T1, typename T2), \ ^~~~~~~~~~~~~~~~~~~~ ../../src/gdb/unittests/offset-type-selftests.c:42:3: note: in expansion of macro 'CHECK_VALID_EXPR_2' CHECK_VALID_EXPR_2 (off_A, off_B, VALID, EXPR_TYPE, EXPR) ^~~~~~~~~~~~~~~~~~ ../../src/gdb/unittests/offset-type-selftests.c:75:1: note: in expansion of macro 'CHECK_VALID' CHECK_VALID (true, off_A&, lval_a += undrl {}); ^~~~~~~~~~~