From patchwork Mon Nov 21 18:56:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 697358 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3tMyWD4RFLz9sxS for ; Tue, 22 Nov 2016 05:56:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="pMN4FY3f"; dkim-atps=neutral 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:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=EXA0ardARooKqGcCD NcDQf6psEt/YzWpG6UZsZG88W5FRSHlSBRmipPrTC2sAmaCYMzXaX2J2eVMb/2Le 0dfFAipTXddMBsi/5xg25YKZORaotRB8Odz9UmiJB23oPjL4nxOaIrOpLJ/CJ38Q MzcCGbNdeUX0dLI5Yxp1+1svc8= 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:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=CRf0jQWDnL3dhmMR/pRwNIb FziQ=; b=pMN4FY3fnUFT4wnhcRFxy+c7gt7TB6LYThW3Yk6AghbJKeavrd4eP2s G6pnTrQrs9iGg9BS2UiSeidrFo/yyQOvy/zEC2ET1It7XjaD3f4uKNDDHCT2fYNr sxZ7R/u2ms9W4Y8mGnbOCQYsa2umv5mVXI1pHOa/5jjp9lmRnHLw= Received: (qmail 22542 invoked by alias); 21 Nov 2016 18:56:31 -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 22528 invoked by uid 89); 21 Nov 2016 18:56:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=PATCHv2, patchv2 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; Mon, 21 Nov 2016 18:56:20 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 69BF57F7B7; Mon, 21 Nov 2016 18:56:19 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-19.brq.redhat.com [10.40.204.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uALIuH6t010884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Nov 2016 13:56:18 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id uALIuFTJ029670; Mon, 21 Nov 2016 19:56:16 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id uALIuEEX027653; Mon, 21 Nov 2016 19:56:14 +0100 Date: Mon, 21 Nov 2016 19:56:14 +0100 From: Jakub Jelinek To: Bernd Edlinger Cc: Jason Merrill , Joseph Myers , "gcc-patches@gcc.gnu.org" , Jeff Law Subject: Re: [PATCHv2, C++] Warn on redefinition of builtin functions (PR c++/71973) Message-ID: <20161121185614.GJ3541@tucnak.redhat.com> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes On Sat, Nov 19, 2016 at 11:11:18AM +0000, Bernd Edlinger wrote: > 2016-11-19 Bernd Edlinger > > PR c++/71973 > * doc/invoke.texi (-Wno-builtin-declaration-mismatch): Document the > new default-enabled warning.. > * builtin-types.def (BT_CONST_TM_PTR): New primitive type. > (BT_PTR_CONST_STRING): Updated. > (BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR): Removed. > (BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_TM_PTR): New function type. > * builtins.def (DEF_TM_BUILTIN): Disable BOTH_P for TM builtins. > (strftime): Update builtin function. > * tree-core.h (TI_CONST_TM_PTR_TYPE): New enum value. > * tree.h (const_tm_ptr_type_node): New type node. > * tree.c (free_lang_data, build_common_tree_nodes): Initialize > const_tm_ptr_type_node. ... This broke 2 tests on i686-linux, I've committed this as obvious to fix it: 2016-11-21 Jakub Jelinek PR c++/71973 * g++.dg/torture/pr53321.C (size_t): Use __SIZE_TYPE__ instead of long unsigned int. * g++.dg/torture/pr63512.C (::strlen): Use __SIZE_TYPE__ instead of unsigned long. Jakub --- gcc/testsuite/g++.dg/torture/pr53321.C.jj 2012-07-16 14:38:22.514585151 +0200 +++ gcc/testsuite/g++.dg/torture/pr53321.C 2016-11-21 19:52:00.561899801 +0100 @@ -2,7 +2,7 @@ // { dg-require-profiling "-fprofile-generate" } // { dg-options "-fprofile-generate" } -typedef long unsigned int size_t; +typedef __SIZE_TYPE__ size_t; extern "C" { --- gcc/testsuite/g++.dg/torture/pr63512.C.jj 2014-10-15 12:28:16.417303928 +0200 +++ gcc/testsuite/g++.dg/torture/pr63512.C 2016-11-21 19:52:45.006330942 +0100 @@ -2,7 +2,7 @@ extern "C" { void __assert_fail (); -unsigned long strlen (const char *); +__SIZE_TYPE__ strlen (const char *); } class A {