From patchwork Tue Sep 10 07:26:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1160050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-508745-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="imcAGd/F"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46SGn46KNFz9s7T for ; Tue, 10 Sep 2019 17:26:47 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=lxDqd5fvatovWxDyTPFoCM4Lu5ceTA8MUIbBMRpKpr1bXE+6yi 1bXu4fgaGlDkcNHrvEG/sEfaHnz9KJt/uPra2p99phLMP/qQ+apFL9oezimwbfci A5HXlzCHJ5Y/I3ctPPZ+rduHFMnc0FeAbzotKmgJWkcLnynK16QB8rPMA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=GOYKNAbkzwCBNPK5Mm207L7NcAk=; b=imcAGd/FaatumiFkBN4c sdY2YcK3qarCMeqP3wogMxAxFiPUXy7vFXHXTXr8erhXFWZVdNzJ/7YzUWzlcemR klhyHTS+WVI8hqGqyI1rVS5ZnXhQJKPhXcjgCUGZF/R6z+qs9voibw0ptg14yMJS 88pO1zImRPSYH/TVaYidqYQ= Received: (qmail 34381 invoked by alias); 10 Sep 2019 07:26:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 34188 invoked by uid 89); 10 Sep 2019 07:26:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Sep 2019 07:26:38 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62D2D305D637; Tue, 10 Sep 2019 07:26:37 +0000 (UTC) Received: from localhost (unknown [10.33.36.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10EC660852; Tue, 10 Sep 2019 07:26:36 +0000 (UTC) Date: Tue, 10 Sep 2019 08:26:36 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Christophe Lyon Subject: [PATCH] PR libstdc++/91711 fix failing test Message-ID: <20190910072636.GA24847@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.12.1 (2019-06-15) PR libstdc++/91711 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to 0ul being a valid null pointer constant. Tested x86-linux, committed to trunk. commit 7c30df0f9caea5ad48484bc72a984c09fc6513fa Author: Jonathan Wakely Date: Mon Sep 9 22:31:26 2019 +0100 PR libstdc++/91711 fix failing test PR libstdc++/91711 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to 0ul being a valid null pointer constant. diff --git a/libstdc++-v3/testsuite/23_containers/span/get_neg.cc b/libstdc++-v3/testsuite/23_containers/span/get_neg.cc index 37d188ed073..cd54716b105 100644 --- a/libstdc++-v3/testsuite/23_containers/span/get_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/span/get_neg.cc @@ -24,7 +24,7 @@ int main() { - std::span myspan((int*)nullptr, 0ul); + std::span myspan((int*)nullptr, (std::size_t)0); std::get<0>(myspan); // { dg-error "here" } } // { dg-error "static assertion failed" "" { target *-*-* } 0 }