From patchwork Wed Sep 11 11:38:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1160926 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-508838-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="PY3mSnXU"; 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 46T0Kc4F0Hz9sCJ for ; Wed, 11 Sep 2019 21:39:00 +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:subject:message-id:mime-version:content-type; q=dns; s= default; b=D9WvyolwTioDSLgvS6nHH5puTV8M0S0MUly2am1HM64WTpB0UOTkZ Wd8AzeX3DK0eeGptljkLRS8Oxe8InLMq+SKo1xHwaH9/iHXEE8jR5iY0XXd/UfVA R7BAx9yfbo/zsNHNeMogVisq+H9ty2ZfJuazjLMmBzvi5D/JlPqlyQ= 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:subject:message-id:mime-version:content-type; s= default; bh=Sy/6hwQxPTQPhqP7/SzTDrz7p04=; b=PY3mSnXUIJKOrGVz+ZO5 S+GeNGsmnN7dairgB8GTdFulvsCuavJkinI8u/DJkq7q2XRtLslzLhP0FqIdmNxg ZUgRg2mRZcgv6dYIwigc7bXtGDoCKDXBLdwKyIdh4YxuQYZTSj+xxWHzemuWpI0V Gio6ezswTZnNC2oeM1TQKQY= Received: (qmail 61719 invoked by alias); 11 Sep 2019 11:38:45 -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 61657 invoked by uid 89); 11 Sep 2019 11:38:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=52748 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; Wed, 11 Sep 2019 11:38:43 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F160176552; Wed, 11 Sep 2019 11:38:41 +0000 (UTC) Received: from localhost (unknown [10.33.36.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A0FF5C21E; Wed, 11 Sep 2019 11:38:41 +0000 (UTC) Date: Wed, 11 Sep 2019 12:38:40 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Fix libstdc++ tests for -Wvolatile warnings in C++2a mode Message-ID: <20190911113840.GA31182@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.12.1 (2019-06-15) * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests. * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile for C++2a and up. Tested x86_64-linux, committed to trunk. commit 25f120f074c602424f5a05bd629deabccd77f75e Author: redi Date: Wed Sep 11 11:38:15 2019 +0000 Fix libstdc++ tests for -Wvolatile warnings in C++2a mode * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests. * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile for C++2a and up. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275643 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/libstdc++-v3/testsuite/20_util/result_of/sfinae_friendly_1.cc b/libstdc++-v3/testsuite/20_util/result_of/sfinae_friendly_1.cc index ed3e011f937..86aa52029cc 100644 --- a/libstdc++-v3/testsuite/20_util/result_of/sfinae_friendly_1.cc +++ b/libstdc++-v3/testsuite/20_util/result_of/sfinae_friendly_1.cc @@ -1,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-additional-options "-Wno-volatile" { target c++2a } } // Copyright (C) 2012-2019 Free Software Foundation, Inc. // @@ -21,9 +22,9 @@ #include #include -// TODO: Uncomment the following define once gcc has fixed bug 52748 +// Uncomment the following define once gcc has fixed bug 52748 // (incomplete types in function call expressions): -//#define HAS_52748_FIXED +#define HAS_52748_FIXED // Helper types: struct has_type_impl @@ -627,9 +628,9 @@ static_assert(is_type&(int, int, int)>, Ukn>(), "Error!"); -static_assert(is_type, Ukn>(), "Error!"); -static_assert(is_type, Ukn>(), "Error!"); -static_assert(is_type, Ukn>(), "Error!"); +static_assert(is_type, Ukn>(), "Error!"); +static_assert(is_type, Ukn>(), "Error!"); +static_assert(is_type, Ukn>(), "Error!"); static_assert(is_type, Ukn>(), "Error!"); static_assert(is_type, Ukn>(), "Error!"); diff --git a/libstdc++-v3/testsuite/tr1/3_function_objects/result_of.cc b/libstdc++-v3/testsuite/tr1/3_function_objects/result_of.cc index 02cf8bf8c6d..dea0665b1e3 100644 --- a/libstdc++-v3/testsuite/tr1/3_function_objects/result_of.cc +++ b/libstdc++-v3/testsuite/tr1/3_function_objects/result_of.cc @@ -17,6 +17,8 @@ // with this library; see the file COPYING3. If not see // . +// { dg-additional-options "-Wno-volatile" { target c++2a } } + // 3.4 function return types #include #include