freetype-devel
[Top][All Lists]
Advanced

[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: suzuki toshiya
Subject: Re: [ft-devel] A few compiler warnings from Mac OS's gcc.
Date: Sun, 02 Mar 2014 03:41:52 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130518 Icedove/17.0.5

Dear Werner,

Sorry for my poor English.

On 03/02/2014 01:57 AM, Werner LEMBERG wrote:
> thanks for your analysis.
> 
>> a) on i386, x86_64 and arm where the optimized numerical functions
>>     are enabled by default, FT_CONFIG_OPTION_FORCE_INT64 should be
>>     enabled, for the developers' visibility.
> 
> OK.
> 
>> b-1) for LP64 systems, [use] the type long instead of long long for
>>       64-bit variables.
> 
> OK.
> 
>> b-2) for ILP32 systems, configure should look up C99 types
>>       (inttypes.h and int64_t), then, if available, use them for
>>       64-bit variables.  Although int64_t is not supported by C90,
>>       -pedantic does not complain about it :-(
> 
> Do we really need this?

In my personal preference, it is better than disabling
Wlong-long internally (if the usage of long long requires
the developers' manual configuration, the developer can
understand the cause of long long - but now FT2 uses
long long internally). But yet I'm not sure about the
trade-off between GCC-portable long long versus C99.
If you have a preference, please let me know.

Also, If the compatibility about the default optimization
is not so big problem, disabling the optimized code by
default would be the easiest way.

>> c) explicitly ignore a warning option and revert it explicitly,
>>     because switching off a pragma in FT2 is not so complicated, it
>>     is not so difficult (however, switching -Wlong-long does not work
>>     for this issue at all! see d))
> 
> It's not clear to me what you want to say here...

Sorry. 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".

>> 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.

Regards,
mpsuzuki



reply via email to

[Prev in Thread] Current Thread [Next in Thread]