On 06/05/2013 10:43 AM, kuldeep dhaka wrote:
Hello,

while working on a program i faced a problem.
i need only 20 bit , and having a 32 bit only waste more memory(12
byte), 24bit would much be better.
i need a uint24_t variable but gcc dont support it so i have to start
with uint32_t.
it would be very nice if gcc support such variables.
i made a little program and found that gcc (on i686) returned error.

http://embeddedgurus.com/stack-overflow/2009/06/three-byte-integers/

--
Kuldeep Singh Dhaka
Sakul
+91-8791676237
kuldeepdha...@gmail.com
Programmer, Open Source, Web Developer, System Administrator,
Entrepreneur, Animal Lover, Student, Reverse Engineer, Embedded
System, Learning.

Bitcoins Accepted.
My GnuPG Public Key
Fork Me

Even if gcc had such a type I bet they would get aligned to 4-bytes on most any target.

My guess is his won't be a high priority for folks. You could look at how types are implemented in gcc, write a patch, make a case and see if you can get it in.

Ed

Reply via email to