[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] A few compiler warnings from Mac OS's gcc.
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] A few compiler warnings from Mac OS's gcc. |
Date: |
Sat, 01 Mar 2014 19:56:29 +0100 (CET) |
> Current pragma design is
>
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wlong-long"
>
> ...
>
> #pragma GCC diagnostic pop
>
> If it is changed to like
>
>
> #pragma GCC diagnostic ignored "-Wlong-long"
>
> ...
>
> #pragma GCC diagnostic warning "-Wlong-long"
>
> the older gcc without pragma stack can work.
> However, switching "-Wlong-long" does not solve this issue,
> because, the root of the warning is "-pedantic".
I did some search in the internet, and it seems that `-pedantic' is
only a problem before gcc 4.6, since later versions can disable
`-Wlong-long' with the pragma as defined already in the FreeType code.
For example, I get zero warnings in a non-devel build with gcc 4.7.2.
>>> d-1) drop -pedantic option (worse idea)
>>
>> What about simply disabling `-pedantic' for older gcc versions?
>> This shouldn't do much harm.
>
> Hmm. I will try to find any combinations can simulate
> -pedantic except of -Wlong-long.
I'll now implement switching off `-pedantic' for gcc < 4.6 – since
`-pedantic' is mainly a diagnostic option, always enabled in the
`devel' build CFLAGS, this should be a safe route.
Maybe you find a different, better solution later :-)
Werner