[Scummvm-devel] ScummVM binary size comparison
max at quendi.de
Thu Nov 13 19:01:33 CET 2008
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*.
More information about the Scummvm-devel