Sorry for lated response about this.

My analysis is following;

a) in recent version of FreeType2 uses 64-bit variant for
optimized numerical calculation, EVEN IF YOU DON'T ENABLE
FT_CONFIG_OPTION_FORCE_INT64 in ftoption.h.

b) at present, for GCC environment, the optimized numerical
functions use long long variable, without consideration how
FT_INT64 is configured.

c) the pragma to calm down "long long" warning in FT2 is
designed for recent GCC having a stacking mechanism for the
warning control (push a disabled status, pop it to restore
original status).

d) the warning C90 does not support 'long long' is NOT
caused by "-Wlong-long", it is caused by "-pedantic", which
cannot be calmed by the conventional pragma.

My idea how to improve is following.

a) on i386, x86_64 and arm which the optimized numerical
functions are enabled by default, FT_CONFIG_OPTION_FORCE_INT64
should be enabled, for the developers' visibility.

b-1) for LP64 systems, the type long instead of long long for
64-bit variables.
b-2) for ILP32 systems, configure should lookup 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 do not complain about it :-(

c) explicitly ignore a warning option and revert it explicitly.
because switching of 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))

d) no good idea. gcc-4.8 supports "-Wpedandic" which can
be disabled by pragma, but, we are working for gcc-4.2 :-(

d-1) drop -pedantic option (worse idea)
d-2) add "-Wno-long-long" along with "-pedantic" for non-LP64
systems by default, and enable "-Wlong-long" by pragma
in most part of FT2  (ugly, worse)
d-3) disable long long usage by default.

Maybe a), b-1), c) would be done immediately, because,
it would not change anything in compiled code.
Others need more discussion. Any comments?

Regards,
mpsuzuki

On 02/23/2014 11:50 AM, [email protected] wrote:
> OK, I will take a look.
> 
> Regards,
> mpsuzuki
> 
> ----- Original Message -----
>> Hi Werner,
>>
>> There are a few warnings from an old Mac OS X's compiler,
>> You might want to look into them?
>>
>> The long long seems to be harmless - but I am somewhat surprised
>> you have a warning suppression for gcc 4.6(?) near one of these - the
> compiler
>> itself reports itself as "(GCC) 4.2.1 (Apple Inc. build 5664)" hence
> not
>> suppressed. You might want to extend the suppression backwards?
>>
>> The right-shift's aren't obvious - I bet you'll know what's supposed
> to happen
>> when you see them.
>>
>> ftconfig.h:532: warning: ISO C90 does not support 'long long'
>> ftconfig.h:535: warning: ISO C90 does not support 'long long'
>> src/truetype/ttinterp.c:1516: warning: ISO C90 does not support 'long
> long'
>> src/truetype/ttinterp.c:1521: warning: ISO C90 does not support 'long
> long'
>> src/truetype/ttinterp.c:1596: warning: ISO C90 does not support 'long
> long'
>> src/truetype/ttinterp.c:1597: warning: ISO C90 does not support 'long
> long'
>> src/base/fttrigon.c:384: warning: right shift count >= width of type
>> src/base/fttrigon.c:385: warning: right shift count >= width of type
>>
>> Hin-Tak
>>
>> _______________________________________________
>> Freetype-devel mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/freetype-devel
>>
> 
> 
> 
> _______________________________________________
> Freetype-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/freetype-devel
> 


_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to