IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: Damn, yer good!
You need the proper GNUisms. The linux kernel is full of this stuff. Try this.

typedef struct
{
unsigned char a_field;
unsigned char a_nother_field;
} HEADER_STRUCT;

typedef struct
{
HEADER_STRUCT header;
int data;
} __attribute__((packed)) MESSAGE_STRUCT;


int main() {
HEADER_STRUCT hs;
MESSAGE_STRUCT ms;
printf ("Sizeof hs = %d\\n", sizeof(hs));
printf ("Sizeof ms = %d\\n", sizeof(ms));
return 0;
}

my output:

Sizeof hs = 2
Sizeof ms = 6

Probably too complicated for the GNU-ers...


And this comment was uncalled for.

Dave "LordBeatnik"
New jb's agin' gcc
-drl
New Ross, Ross, Ross...How you oversimplify...
I'm not "agin'" gcc so much as I am profoundly disappointed in it.

You see, I had this Pollyanna-ish idea that GNU, being all Open Source and all, and having the opportunity to cull development talents from the Best and Brightest of the development Community, would be a Shining Star...a Beacon of Light illuminating the farthest reaches of C and C++ mastership....conforming to the latest of ANSI/ISO C and C++ standards while having myraid capabilities to tailor its behavior to whatever Obscure Dialect of C or C++ you happened to confront it with...to provide a bar that even Borland would not be able to scale....

Then I was introduced to 2.95.2.

Ya know...all they would have had to do was supply a compliant STL....

So you see, I'm not really against GNU per se. Now Micros~1...them I'm against!




(I hope we've cleared that up...)
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Played with 3.x?
Significantly better code generation, allegedly.


Peter
[link|http://www.debian.org|Shill For Hire]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Blog]
New Well, somewhat...
The only 3.x I've been exposed to was the Nios variant, the problems with which I've discussed in this thread. Granted, the alignment problems are probably parochial, and not the fault of GNU. On the issues of ANSI compliance, and the STL...the jury's still out.

Sure would like to get a coherent set of documentation on it, tho (and no, the man page nor the D'oxygen pile do not qualify as "coherent documentation"!).
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Been there. Done that.
Didn't work!
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Out of curiosity?
What's the length of the data structure if there's only a one byte field defined? Guessing that it's still 4.
New Yup. 4. (Coincidently, == sizeof(int))
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

     gcc question - (jb4) - (14)
         Re: gcc question - (JimWeirich) - (13)
             Yes, the padding is at the end of the struct - (jb4) - (12)
                 Using gcc-3.3 on Debian: Sizeof hs = 2 -NT - (Yendor)
                 OK...minor mistake - (jb4) - (10)
                     Knowing nothing about the processor in particular... - (ChrisR) - (9)
                         Damn, yer good! - (jb4) - (8)
                             Re: Damn, yer good! - (lordbeatnik) - (7)
                                 jb's agin' gcc -NT - (deSitter) - (3)
                                     Ross, Ross, Ross...How you oversimplify... - (jb4) - (2)
                                         Played with 3.x? - (pwhysall) - (1)
                                             Well, somewhat... - (jb4)
                                 Been there. Done that. - (jb4) - (2)
                                     Out of curiosity? - (ChrisR) - (1)
                                         Yup. 4. (Coincidently, == sizeof(int)) -NT - (jb4)

I can't shake this feeling from my head.
120 ms