Friday, September 10 2010

Login Form






Lost Password?
No account yet? Register

Syndicate

Polls

Games should by played at:
 
spacer.png, 0 kB
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
char unsigned char and packed structs (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: char unsigned char and packed structs
#2948
char unsigned char and packed structs  
Hello comp.std.c Why isn't there a way to tell the compiler to pack the structure? (pack: no padding bytes, sizeof struct equal to sum of sizeof members) You might argue this is provided by most implementations and not really an issue, but way I see it, there's no reason not to have such feature, unless I'm mistaken about the following: (excuse the terminology) 1) an _object_ is really just multiple of unsigned char. (that's what sizeof reports) 2) it's possible to treat any unsigned char m[sizeof(T)] as *(T*)m
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2949
Keith Thompson (Visitor)
Click here to see the profile of this user
Birthdate:
char unsigned char and packed structs  
Hello comp.std.c Why isn't there a way to tell the compiler to pack the structure? (pack: no padding bytes, sizeof struct equal to sum of sizeof members) You might argue this is provided by most implementations and not really an issue, but way I see it, there's no reason not to have such feature, unless I'm mistaken about the following: (excuse the terminology) 1) an _object_ is really just multiple of unsigned char. (that's what sizeof reports) 2) it's possible to treat any unsigned char m[sizeof(T)] as *(T*)m
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2950
char unsigned char and packed structs  
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it writes: 1) an _object_ is really just multiple of unsigned char. (that's what sizeof reports) 2) it's possible to treat any unsigned char m[sizeof(T)] as *(T*)m
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2951
Keith Thompson (Visitor)
Click here to see the profile of this user
Birthdate:
char unsigned char and packed structs  
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it writes: 1) an _object_ is really just multiple of unsigned char. (that's what sizeof reports) 2) it's possible to treat any unsigned char m[sizeof(T)] as *(T*)m
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2952
char unsigned char and packed structs  
This could certainly be defined, but it would be a fairly major change to the language
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2953
Jack Klein (Visitor)
Click here to see the profile of this user
Birthdate:
char unsigned char and packed structs  
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it writes: 1) an _object_ is really just multiple of unsigned char. (that's what sizeof reports) 2) it's possible to treat any unsigned char m[sizeof(T)] as *(T*)m
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Who's Online

We have 4 guests online

Top 5 games


Street Fighter IV
Editorial Rating: 96%
Rating 55% of the readers
Popularity: 621 votes
hobby.used-moto.co.uk cars.motorization4u.co.uk Kiteboards


Killzone 2
Editorial Rating: 95%
Rating 83% of the readers
Popularity: 4192 votes
automobiles.money4car.co.uk Polish Pottery Vertu Phone Replica


LittleBigPlanet
Editorial Rating: 95%
Rating 64% of the readers
Popularity: 1072 votes
Car parts online used cars FIRE-MAGMA FORUM


Gears of War 2
Editorial Rating: 94%
Rating 83% of the readers
Popularity: 2195 votes
OtimizaƧao de sites no Google wedding photographer glasgow Chasse Pologne au


Grand Theft Auto: Chinatown Wars
Editorial Rating: 94%
Rating 62% of the readers
Popularity: 586 votes
papiertragetaschen waagen kunstschmiede

Coming Soon

- Nancy Drew: Ransom of the Seven Ships (action) PC
- NCAA Football 10 (Sports) 360 PS3 PSP PS2
- Blood Bowl (Sports / strategy) PSP NDS
- Guitar Hero: Greatest Hits (Puzzle) 360 PS3 Wii PS2
- Guitar Hero: World Tour (Puzzle) PC
- Ice Age: Dawn of the Dinosaurs (Family / Action games) PS2 360 PS3
- Virtua Tennis 2009 (Sports) PC
- Battlefield 1943 (Action games) PS3
- Manager Kolarski 2009 (simulation) PC
- Battlefield 1943 (Action games) 360
- World War II General Commander - Operation: Watch on the Rhine (strategy) PC
spacer.png, 0 kB