• 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
GCC 4.x error vs warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 4.x error vs warning


  • Subject: GCC 4.x error vs warning
  • From: Schuyler Baldwin II <email@hidden>
  • Date: Wed, 23 Jul 2008 19:07:00 -0500

The following code generates a warning. I would like it to generate an error. With gcc 4.2 I can turn some warnings into errors with the - Werror= flag. Does anybody
know if this is possible with GCC ?


I think this warning should always be an error.

void foo(int *cnt);
void test(void);

void foo( int *cnt)
{
	*cnt = 5;
}

void test(void)
{
int cnt;
foo(cnt); // warning: passing argument 1 of 'foo' makes pointer from integer without a cast


	foo(&cnt);	// this is correct;
}

_______________________________________________
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


  • Prev by Date: Re: turn off function parameter indent on paste?
  • Next by Date: Re: Uninstall 3.1
  • Previous by thread: Re: Nib vs. Xib in documentation and discussions
  • Next by thread: Icon button missing from XCode 3.1
  • Index(es):
    • Date
    • Thread