freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] ft_setjmp in Codewarrior


From: Werner LEMBERG
Subject: Re: [ft-devel] ft_setjmp in Codewarrior
Date: Sat, 08 Nov 2008 17:13:14 +0100 (CET)

> a) Compile ftobjs.c (or ftbase.c) with "-relax_pointers".
> b) Insert "#pragma mpwc_relax" with appropriate conditionals (to
>    avoid this pragma to other compilers).
> c) Use "volatile void*" instead of "volatile jmp_buf*".
> 
> I guess, a) is not good workaround for CodeWarrior users.  Because,
> CodeWarrior project does not support per-file compile options, so
> the developers using CW project file would compile most sources with
> "-relax_pointers", it makes difficult to find other unexpected
> pointer casting.
> 
> b) is appropriate-level workaround (the modification is restricted
> to the problematic part only), but it's questionable to insert
> legacy-platform-specific workaround in generic source file ftobjs.c.
> 
> c) is compiler-independent and generic workaround, but its impact
> (against the optimizer) can be slightly large.  At present, I've
> checked the assembly outputs by a few C compilers, and I didn't find
> no difference between "volatile jmp_buf*" versus "volatile void*".

For me, solution (b) seems easiest.  What about moving the jmp_buf
stuff to a separate file so that it can be easily overridden in
builds/mac?  Note, however, that my opinion is just a `feeling', not
based on any facts.


    Werner




reply via email to

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