* Overly-keen format string warning?
@ 2009-09-15 16:06 Dave Korn
2009-09-15 16:52 ` Michael Meissner
0 siblings, 1 reply; 3+ messages in thread
From: Dave Korn @ 2009-09-15 16:06 UTC (permalink / raw)
To: gcc
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.
cheers,
DaveK
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Overly-keen format string warning?
2009-09-15 16:06 Overly-keen format string warning? Dave Korn
@ 2009-09-15 16:52 ` Michael Meissner
2009-09-15 17:20 ` Dave Korn
0 siblings, 1 reply; 3+ messages in thread
From: Michael Meissner @ 2009-09-15 16:52 UTC (permalink / raw)
To: Dave Korn; +Cc: gcc
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, even if it will work in most cases.
Just for the record, before working on GCC, I wrote the front end of a C
compiler for a machine (Data General MV/Eclipse) that had different types of
pointers, and it was definately a hassle, particularly in the era before
prototypes were added to the language.
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Overly-keen format string warning?
2009-09-15 16:52 ` Michael Meissner
@ 2009-09-15 17:20 ` Dave Korn
0 siblings, 0 replies; 3+ messages in thread
From: Dave Korn @ 2009-09-15 17:20 UTC (permalink / raw)
To: Michael Meissner, Dave Korn, gcc
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-15 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 16:06 Overly-keen format string warning? Dave Korn
2009-09-15 16:52 ` Michael Meissner
2009-09-15 17:20 ` Dave Korn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).