From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28746 invoked by alias); 15 Sep 2009 17:20:36 -0000 Received: (qmail 28734 invoked by uid 22791); 15 Sep 2009 17:20:34 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f226.google.com (HELO mail-ew0-f226.google.com) (209.85.219.226) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Sep 2009 17:20:28 +0000 Received: by ewy26 with SMTP id 26so3966608ewy.29 for ; Tue, 15 Sep 2009 10:20:26 -0700 (PDT) Received: by 10.211.174.10 with SMTP id b10mr8830625ebp.39.1253035226150; Tue, 15 Sep 2009 10:20:26 -0700 (PDT) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 28sm3653377eye.8.2009.09.15.10.20.25 (version=SSLv3 cipher=RC4-MD5); Tue, 15 Sep 2009 10:20:25 -0700 (PDT) Message-ID: <4AAFD02D.5060007@gmail.com> Date: Tue, 15 Sep 2009 17:20:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Michael Meissner , Dave Korn , "gcc@gcc.gnu.org" Subject: Re: Overly-keen format string warning? References: <4AAFBEB6.8070706@gmail.com> <20090915165234.GA7472@hungry-tiger.westford.ibm.com> In-Reply-To: <20090915165234.GA7472@hungry-tiger.westford.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00282.txt.bz2 Michael Meissner wrote: > On Tue, Sep 15, 2009 at 05:20:06PM +0100, Dave Korn wrote: >> I added some debugging printfs, and ... >> >>> cc1: warnings being treated as errors >>> /gnu/gcc/gcc/gcc/dwarf2out.c: In function 'add_location_or_const_value_attribute >>> ': >>> /gnu/gcc/gcc/gcc/dwarf2out.c:13532:1: error: format '%p' expects type 'void *', >>> but argument 3 has type 'struct var_loc_list *' >>> /gnu/gcc/gcc/gcc/dwarf2out.c:13532:1: error: format '%p' expects type 'void *', >>> but argument 4 has type 'struct var_loc_node *' >>> /gnu/gcc/gcc/gcc/dwarf2out.c:13532:1: error: format '%p' expects type 'void *', >>> but argument 5 has type 'rtx' >>> /gnu/gcc/gcc/gcc/dwarf2out.c:13532:1: error: format '%p' expects type 'void *', >>> but argument 3 has type 'struct var_loc_list *' >>> /gnu/gcc/gcc/gcc/dwarf2out.c:13532:1: error: format '%p' expects type 'void *', >>> but argument 4 has type 'struct var_loc_node *' >>> /gnu/gcc/gcc/gcc/dwarf2out.c:13532:1: error: format '%p' expects type 'void *', >>> but argument 5 has type 'rtx' >>> make: *** [dwarf2out.o] Error 1 >>> >>> DKAdmin@ubik /gnu/gcc/obj.libstdc.enabled/gcc >> Should the format string warnings really be complaining about this on a >> platform (i686-pc-cygwin) where there's only one kind of pointer? I don't get >> the rationale, if this is intentional. > > Yes. It still is a type violation, Ah, it's because pointers can't decay to void as an unnamed stdargs argument, isn't it? Thanks. cheers, DaveK