[Top][All Lists]

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

Re: [Tinycc-devel] HELP: __attribute__ ((packed)) confusion

From: Fabrice Bellard
Subject: Re: [Tinycc-devel] HELP: __attribute__ ((packed)) confusion
Date: Thu, 10 Feb 2005 00:20:41 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913


In TCC 'packed' is supported only for structure fields or variable declarations, not for a whole structure. So a solution for you is to add it to each field of the packed structure.


Christopher Dobbs wrote:
I need __attribute__ ((packed)) to work.
The docs say that it does.
Here is a snippit of code that I am using:

#define PACKED __attribute__ ((packed))

typedef struct {
} PACKED MyStruct_;

The structure is to be 512 bytes in size, but comes out 516.
If I recompile using gcc, all is how it should be.

I would rather use tcc, but this and a few other projects require packed

Thanks in advance for any help.

Christopher Dobbs

Tinycc-devel mailing list

reply via email to

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