[Scummvm-devel] ScummVM binary size comparison

Bertrand Augereau bertrand_augereau at yahoo.fr
Thu Nov 13 21:16:05 CET 2008


Hi guys,There is also a mixed approach by using the preprocessor... for the inline qualifier only :)MSVC:#define FORCE_INLINE __forceinline
G++:#define FORCE_INLINE __attribute__((always_inline))
--- En date de : Jeu 13.11.08, Max Horn <max at quendi.de> a écrit :
De: Max Horn <max at quendi.de>
Objet: Re: [Scummvm-devel] ScummVM binary size comparison
À: "David Given" <dg at cowlark.com>
Cc: "ScummVM devel" <scummvm-devel at lists.sourceforge.net>
Date: Jeudi 13 Novembre 2008, 19h01

Am 13.11.2008 um 18:08 schrieb David Given:

> Max Horn wrote:
> [...]
>> Welll, I already implemented the "inline" version, at least
GCC seems
>> to honor it just fine (at least when building with -Os or any other
>> non-zero optimization level). I would also expect MSVC to do so. As
>> Johannes said, if we encounter a compiler which has troubles with
>> this, we can still change it to the macro approach :)
>
> Don't forget the new C/C++ vararg macro support; that'll provide a
> syntax-compatible alternate implementation.

> It also has the advantage that if faced with a really ancient compiler
> that does neither empty inlines nor vararg macros, it should be
> relatively straightforward to bolt on a third-party preprocessor and
> make them work that way.

I wouldn't consider it an acceptable solution to potentially force  
people who want to port ScummVM to "exotic" systems to "bolt
on" a 3rd  
party preprocessor. It seems to have to more or less the same drawback  
as the "use inline function" approach (not supported by all  
compilers), only worse: No easy fallback (if the compiler doesn't  
implement / optimize inline properly, it still compilers), and I  
believe less compilers support varadic macros.


For now, let's just continue as-is, and if we find a port where the  
compiler does not optimize empty inline functions away properly, we  
can still reconsider. Really, folks, the code is already in  
Subversion, so, unless you know any system on which it causes  
troubles, let's put this to the rest, and let's focus on more  
important issues, e.g. the color of the bikeshed. *ggg*.

Bye,
Max

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Scummvm-devel mailing list
Scummvm-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scummvm-devel



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20081113/eb6c245f/attachment.html>


More information about the Scummvm-devel mailing list