Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-28 Thread Sean McBride
On Sun, 27 Nov 2011 16:04:08 +0900, suzuki toshiya said: I built gcc-4.6.1 and clang/llvm-2.9 by myself. It can make working binary for the simplest programs, like hello-world, but apinames built with -ftrapv by my clang aborts with Illegal instruction error. It seems that I have to learn more to

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-28 Thread Antoine Leca
Sean McBride wrote: Clang is an interesting tool to discover that sort of gotchas. 360 if ( (FT_ULong)(type-flags - FT_INT_MIN) FT_UINT_MAX ) This one should really look like if ( (FT_ULong)type-flags - FT_INT_MIN FT_UINT_MAX ) according to ANSI C : since FT_INT_MIN

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-26 Thread suzuki toshiya
Sigh, clang on Debian squeeze branch (previous newest branch) seems to be shipped without appropriate dependency; clang can search gcc until 4.6.1, but cannot search 4.6.2, and gcc-4.6.1 binaries are already removed from debian repository. Also Debian clang maintainers are mainly working for

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-26 Thread İsmail Dönmez
Hi; On Sun, Nov 27, 2011 at 8:04 AM, suzuki toshiya mpsuz...@hiroshima-u.ac.jpwrote: Sigh, clang on Debian squeeze branch (previous newest branch) seems to be shipped without appropriate dependency; clang can search gcc until 4.6.1, but cannot search 4.6.2, and gcc-4.6.1 binaries are already

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-26 Thread suzuki toshiya
İsmail Dönmez wrote: I built gcc-4.6.1 and clang/llvm-2.9 by myself. It can make working binary for the simplest programs, like hello-world, but apinames built with -ftrapv by my clang aborts with Illegal instruction error. It seems that I have to learn more to make usable clang by myself...

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-26 Thread İsmail Dönmez
Hi; On Sun, Nov 27, 2011 at 8:43 AM, suzuki toshiya mpsuz...@hiroshima-u.ac.jpwrote: İsmail Dönmez wrote: I built gcc-4.6.1 and clang/llvm-2.9 by myself. It can make working binary for the simplest programs, like hello-world, but apinames built with -ftrapv by my clang aborts with Illegal

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-23 Thread Sean McBride
On Wed, 23 Nov 2011 03:00:06 +0900, suzuki toshiya said: Thanks, I have to thank you (as always) for finding the issue. The part was introduced by me, commit 5d3ff05615dda6d1325ed612381a17a0df04c975 Author: suzuki toshiya mpsuz...@hiroshima-u.ac.jp Date: Sat Aug 1 00:32:24 2009 +0900

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-23 Thread suzuki toshiya
Nothing to say, I have to try. Yet I've not installed clang in my daily-using machine, but it is Debian and it won't be so hard to install clang. Also my MacBook already has (an old) clang. Regards, mpsuzuki Sean McBride wrote: On Wed, 23 Nov 2011 03:00:06 +0900, suzuki toshiya said:

[ft-devel] freetype, undefined behaviour, and clang

2011-11-22 Thread Sean McBride
Hi all, I recently read this 3 part blog article by the architect of llvm/clang, which I highly recommend: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html

Re: [ft-devel] freetype, undefined behaviour, and clang

2011-11-22 Thread suzuki toshiya
Hi, Thanks, I have to thank you (as always) for finding the issue. The part was introduced by me, commit 5d3ff05615dda6d1325ed612381a17a0df04c975 Author: suzuki toshiya mpsuz...@hiroshima-u.ac.jp Date: Sat Aug 1 00:32:24 2009 +0900 cache: Check higher bits in flags for non ILP32 systems.