From patchwork Tue Jul 23 09:17:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chung-Ju Wu X-Patchwork-Id: 261000 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 723E22C00BB for ; Tue, 23 Jul 2013 19:18:10 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=EFmf2R7ocq0cdHp2r/ /3ysvjrsrB9e+SoHYCDj2zO+XLqJf+fE9+rpuf9PHZocC2wFMb6UsErKMDQP6BzH FACvBe4/4JYe6vp/xhJYuBdpBirV1N3gKZdoNIfowAKZQBfEqylk+LczV09vRvac ZYsfg+u2d9JjjPryGOjyqp6Ds= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=F2WokHihbAEPVqcpOtWM54ts kng=; b=gdVPUl1G1jC11mSiNZp8UotuASAGu41NeXyVL3CoQtc0YZzarofLz/YO 23zOgykJUWYRyr8kh7KI8+JPW5QwnKplVzTJKTbM2DzIA2BO+4WgbZbGI8mm6IbW Dkn+BjtuTSRnX+GTcI40xfDxdjK/ukwt2a/xteHZ94EfHYC31o4= Received: (qmail 20425 invoked by alias); 23 Jul 2013 09:18:03 -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 20371 invoked by uid 89); 23 Jul 2013 09:18:02 -0000 X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RDNS_NONE, SPF_PASS, TW_SF, TW_UC autolearn=no version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from Unknown (HELO mail-pb0-f43.google.com) (209.85.160.43) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 23 Jul 2013 09:18:02 +0000 Received: by mail-pb0-f43.google.com with SMTP id md12so8153340pbc.16 for ; Tue, 23 Jul 2013 02:17:54 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.66.27.43 with SMTP id q11mr30392508pag.97.1374571074873; Tue, 23 Jul 2013 02:17:54 -0700 (PDT) Received: by 10.68.16.134 with HTTP; Tue, 23 Jul 2013 02:17:54 -0700 (PDT) In-Reply-To: <51ED2095.9000403@oracle.com> References: <51ED2095.9000403@oracle.com> Date: Tue, 23 Jul 2013 17:17:54 +0800 Message-ID: Subject: Re: [v3] libstdc++/57920 From: Chung-Ju Wu To: Paolo Carlini Cc: "gcc-patches@gcc.gnu.org" , "libstdc++" 2013/7/22 Paolo Carlini : > Hi, > > see audit trail for details. I tested on x86_64-linux (with/without > _GLIBCXX_X86_RDRAND artificially undefined) the below straightforward patch > and checked by hand the strace. I'm going to apply it soon. > > Thanks, > Paolo. > > /////////////////// Hi, Paolo, In this patch I can see that you thought cstdio is unnecessary: However, for some cases the file libstdc++-v3/include/std/random may include libstdc++-v3/include/bits/random.h, in which there is a declaration using FILE type: [libstdc++-v3/include/std/random] 46 #ifdef _GLIBCXX_USE_C99_STDINT_TR1 47 48 #include // For uint_fast32_t, uint_fast64_t, uint_least32_t 49 #include 50 #include 51 #include 52 53 #endif // _GLIBCXX_USE_C99_STDINT_TR1 [libstdc++-v3/include/bits/random.h] 1639 union 1640 { 1641 FILE* _M_file; 1642 mt19937 _M_mt; 1643 }; causing the following error: libstdc++-v3/include/bits/random.h:1641:5: error: 'FILE' does not name a type FILE* _M_file; Perhaps cstdio is necessary in this case. What do you think? :-) Best regards, jasonwucj Index: include/std/random ================================================ --- include/std/random (revision 201122) +++ include/std/random (working copy) @@ -36,7 +36,6 @@ #else #include -#include #include #include #include