Re: Per-file Warnings suppression?
Re: Per-file Warnings suppression?
- Subject: Re: Per-file Warnings suppression?
- From: Peter O'Gorman <email@hidden>
- Date: Wed, 01 Oct 2008 21:16:53 -0500
Michael Crawford wrote:
> On Wed, Oct 1, 2008 at 10:11 AM, Brian Stern <email@hidden> wrote:
>> What would make all of this much simpler would be if gcc had a way of
>> turning on/off warnings and other compiler settings in the source code. I
>> don't think it has any way to do that. Is this a feature that's ever been
>> suggested for gcc? Is there any likelihood of it ever being implemented?
>
> The natural way to do that would be to use a #pragma, which is what
> Visual Studio does, but #pragma's give Richard Stallman hives because
> they're not portable.
I assume that you did what I sometimes do and replied before reading the
entire thread. There are a number of #pragmas that are accepted by gcc,
so I imagine that RMS' hives, if any, have other causes :)
Although #pragma GCC diagnose is not available in Xcode's gcc-4.0.1, it
is available in Xcode's gcc-4.2 and llvm-gcc-4.2.
>
> I doubt it's ever happened, but in principle a #pragma could be
> implemented that is required on one platform, but causes compilation
> failures or even runtime crashes on another.
These pragmas are in the GCC namespace, so should not cause problems, or
at least, should cause fewer problems.
Peter
--
Peter O'Gorman
http://pogma.com
_______________________________________________
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