From patchwork Sat Sep 1 12:21:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Andris_Pav=C4=93nis?= X-Patchwork-Id: 181132 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]) by ozlabs.org (Postfix) with SMTP id 21C6B2C008A for ; Sat, 1 Sep 2012 22:22:28 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1347106949; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=4X+1MU8 hHWVxBW+RwT2vZhOJ/dw=; b=ptRlpt0siMGtUqPHGRhIciDpeqA3ae40cB42xzl q1lIuowvGuRNFHANnQg5pGU/hL72D/4/Jlj0qGvjrl06St+VjaNYqlnWcBdjaXUX DVodIep1v5c7WeFvb5C/7dIqsfEBHMYScvm8Ib4H5a8S7akT5yPGk0Yo76s9ScXp T+A8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=ER8gdXdiQFZSe3HhKfgDZUODlnBmOj23Mp3cddNxkhUQ2mAUKnP1eYC4FCJ0bh LwVc1SHPHb4l6pL7+/eGYIuIAcyWM5yCE2Tb8GuLc9T4pCvuOGcKewxNsEKA34Fy 3WNY8sgP6C+Fi+QJ9HBvF3hqrgdvuOV216GpS38YBOQO8=; Received: (qmail 21196 invoked by alias); 1 Sep 2012 12:22:21 -0000 Received: (qmail 21174 invoked by uid 22791); 1 Sep 2012 12:22:18 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mta-out.inet.fi (HELO kirsi2.inet.fi) (195.156.147.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 Sep 2012 12:22:05 +0000 Received: from ap.localhost.localdomain (80.223.211.188) by kirsi2.inet.fi (8.5.140.03) (authenticated as pavean-2) id 502AD360001F14BC; Sat, 1 Sep 2012 15:21:59 +0300 Message-ID: <5041FDE7.1000104@iki.fi> Date: Sat, 01 Sep 2012 15:21:59 +0300 From: Andris Pavenis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH, C] Mixed pointer types in call to streamer_tree_cache_lookup() in gcc/lto-streamer-out.c 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 uint32_t * is used as a 3rd parameter in call to streamer_tree_cache_lookup() in 2 places in gcc/lto-streamer-out.c when the procedure prototype have unsigned *. They are not guaranteed to be the same for all targets (I got error when building for DJGPP) Andris ChangeLog entry 2012-09-01 Andris Pavenis * lto-streamer-out.c (write_global_references, lto_output_decl_state_refs): Fix parameter type in call to streamer_tree_cache_lookup diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 2adae74..12335c5 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -1098,7 +1098,7 @@ write_global_references (struct output_block *ob, for (index = 0; index < size; index++) { - uint32_t slot_num; + unsigned slot_num; t = lto_tree_ref_encoder_get_tree (encoder, index); streamer_tree_cache_lookup (ob->writer_cache, t, &slot_num); @@ -1131,7 +1131,7 @@ lto_output_decl_state_refs (struct output_block *ob, struct lto_out_decl_state *state) { unsigned i; - uint32_t ref; + unsigned ref; tree decl; /* Write reference to FUNCTION_DECL. If there is not function,