• 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: How to disable 'warning: converting to 'int' from 'float'' warning?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to disable 'warning: converting to 'int' from 'float'' warning?


  • Subject: Re: How to disable 'warning: converting to 'int' from 'float'' warning?
  • From: Alastair Houghton <email@hidden>
  • Date: Sat, 8 Oct 2005 14:20:43 +0100

On 7 Oct 2005, at 17:53, Andy Lee wrote:

On Oct 7, 2005, at 12:41 PM, Alastair Houghton wrote:

It should be relatively easy to add an option to GCC to control this
warning if you *really* need to disable it. Otherwise you could adopt
the approach I saw a while back, which was to always run the compiler
through a Perl script that filtered out unwanted warnings. (I can't
say I'm a huge fan of that, but it might be a good option for you, which
is why I mention it).

Instead of filtering out the warnings, would it be possible for the Perl script to use the warnings to find the line of code where the cast is needed, and add it? Maybe using a macro like MY_INT_CAST_HACK in case you want to grep for it later and remove it.

I think it'd be pretty tricky, to be honest, as it would need to understand where in the line to place the cast, and I doubt the warning contains sufficient information to unambiguously tell where it needs to be inserted. If there's a suitable parser (for C/C++/ ObjC/ObjC++) on CPAN somewhere it might be easier, but it still doesn't sound at all trivial.


Kind regards,

Alastair.

--
http://www.alastairs-place.net


_______________________________________________ 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
References: 
 >How to disable 'warning: converting to 'int' from 'float'' warning? (From: "Sean McBride" <email@hidden>)
 >Re: How to disable 'warning: converting to 'int' from 'float'' warning? (From: Alastair Houghton <email@hidden>)
 >Re: How to disable 'warning: converting to 'int' from 'float'' warning? (From: "Sean McBride" <email@hidden>)
 >Re: How to disable 'warning: converting to 'int' from 'float'' warning? (From: Alastair Houghton <email@hidden>)
 >Re: How to disable 'warning: converting to 'int' from 'float'' warning? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: GDB: Does "catch vfork" work?
  • Next by Date: Crash log - "Backtrace not available"
  • Previous by thread: Re: How to disable 'warning: converting to 'int' from 'float'' warning?
  • Next by thread: Re: How to disable 'warning: converting to 'int' from 'float'' warning?
  • Index(es):
    • Date
    • Thread