[Scummvm-devel] Problem with alignement with GCC

Lionel Ulmer lionel.ulmer at free.fr
Mon Nov 12 05:04:02 CET 2001

On Mon, Nov 12, 2001 at 10:54:26AM +0000, David Given wrote:
> You know that #pragma pack is deprecated in gcc? You're supposed to use 
> __attribute__ ((packed(n))), used like this:
> #define PACKED(n) __attribute__ ((packed(n)))
> struct S {
> 	...blah...
> } PACKED(1);

Well, if you look at my patch, this is EXACTLY what I am fixing in it :-) I
added a GCC_PACK that is defined as __attribute__((packed(1))) and I added
it to all the structures between NEED_PACK and END_PACK.

Except that it seems that this patch was not applied this week-end (any
reason why, Ludvig ?). I planned to release a new version of the patch
updated with the latest CVS tonight assorted to a bug report on SF.net :-)

> #pragma packed is probably going to silently disappear sometime in the future.

The 'silently' is VERY ugly IMHO. GCC people should at least have output a
warning if #pragma pack() is used on GCC builds not supporting this feature.

> BTW, you mention getting sound working on the iPAQ --- I can't get sound to 
> work at all. When I enable USE_IMUSE it complains that it can't find sound.h, 
> which I assume is the missing iMUSE engine. Any news on the release status of 
> this yet?

Well, I do not speak about music but about sound effects (i.e. voice and
noises). At least, it works fine in Day of the Tentacle when copying over
the monster.sou file.

By the way, you need also my second 'packing' patch to have sound (if the
iPAQ you mention is running Linux of course :-) ).


		 Lionel Ulmer - http://www.bbrox.org/

More information about the Scummvm-devel mailing list