• 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 warning instead of error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gcc warning instead of error


  • Subject: Gcc warning instead of error
  • From: Steve Checkoway <email@hidden>
  • Date: Tue, 22 Jul 2008 00:58:19 -0700

Gcc will emit a warning for what should really be an error in the following case:

struct foo { foo() {} };
void bar( int i, ... );
void baz() { bar( 0, foo() ); }

compiles to

__Z3bazv:
        stmw r30,-8(r1)
        stwu r1,-48(r1)
        mr r30,r1
        trap

with the warning, "warning: cannot pass objects of non-POD type ‘struct foo’ through ‘...’; call will abort at runtime."

I cannot think of a single situation where I want gcc to insert a trap in my code rather than signal an error on what is typically bad arguments to printf(). Is there a way to make this an error other than -Werror which (unfortunately) I cannot use as there are warnings in code I can't change?

--
Steve Checkoway

    "Anyone who says that the solution is to educate the users
    hasn't ever met an actual user." -- Bruce Schneier




Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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 warning instead of error
      • From: "Chris Jefferson" <email@hidden>
    • Re: Gcc warning instead of error
      • From: Stefan Werner <email@hidden>
  • Prev by Date: Re: Spurious warnings
  • Next by Date: Re: Spurious warnings
  • Previous by thread: Re: Problems attaching debugger
  • Next by thread: Re: Gcc warning instead of error
  • Index(es):
    • Date
    • Thread