public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Size of enum‏
@ 2012-02-05 16:29 Alexandre Almeida
  2012-02-05 20:40 ` David Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Almeida @ 2012-02-05 16:29 UTC (permalink / raw)
  To: gcc


What do you think about making enum types have only the size needed for the number of constants held?
If an enum type has 256 constants or less, for example, it needs only one byte. If it has between 257 and 65536 constants, in the other hand, it needs two bytes.
 		 	   		  

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-06 22:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-05 16:29 Size of enum‏ Alexandre Almeida
2012-02-05 20:40 ` David Brown
2012-02-05 20:51   ` David Brown
2012-02-05 21:13   ` Jonathan Wakely
2012-02-05 22:40     ` James Dennett
2012-02-06 22:15       ` Alexandre Almeida
2012-02-06 23:22         ` Andrew Pinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).