• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gcc-4.2 -pedantic is too pedantic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc-4.2 -pedantic is too pedantic


  • Subject: Re: gcc-4.2 -pedantic is too pedantic
  • From: Chris Espinosa <email@hidden>
  • Date: Wed, 16 Sep 2009 10:30:50 -0700


On Sep 16, 2009, at 7:41 AM, John Reppy wrote:

When compiling some existing code on Snow Leopard, I'm getting warnings
about the use the use of the "%p" format specifier that seem excessive.
For example


<jhr@woton> cat p.c
#include <stdio.h>
void foo (int *x) { printf("%p\n", x); }
<jhr@woton> gcc -c -pedantic -m64 p.c
p.c: In function ‘foo’:
p.c:2: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘int *’


Since pointer types silently convert to void * in other cases, this warning
seems wrong to me.


FWIW I've also compiled this example using gcc 4.3 on Linux and do not get a warning.

Is this behavior a bug or a feature?

This is not specifically known in gcc 4.2 but seems related to another known bug. Please file a bug report and refer to bug 5935478.


Chris _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: gcc-4.2 -pedantic is too pedantic
      • From: John Reppy <email@hidden>
References: 
 >gcc-4.2 -pedantic is too pedantic (From: John Reppy <email@hidden>)

  • Prev by Date: Re: Breakpoints won't fire without special dance
  • Next by Date: Re: Xcode 3.2 syntax highlighting glitch
  • Previous by thread: gcc-4.2 -pedantic is too pedantic
  • Next by thread: Re: gcc-4.2 -pedantic is too pedantic
  • Index(es):
    • Date
    • Thread