Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!ncar!mailrus!uflorida!novavax!proxftl!bill From: bill@proxftl.UUCP (T. William Wells) Newsgroups: comp.lang.c Subject: Re: Absolute size of 'short' Message-ID: <678@proxftl.UUCP> Date: 30 Aug 88 14:25:41 GMT References: <214@ISIDAPS5.UUCP> <9641@dartvax.Dartmouth.EDU> <62505@sun.uucp> <625@proxftl.UUCP> <1382@ficc.uu.net> Reply-To: bill@proxftl.UUCP (T. William Wells) Organization: Proximity Technology, Ft. Lauderdale Lines: 46 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <1382@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: : In article <625@proxftl.UUCP>, bill@proxftl.UUCP (T. William Wells) writes: : > In article <11941@steinmetz.ge.com> davidsen@crdos1.UUCP (bill davidsen) : writes about 'int*6' as a portable declaration for a 6 byte integer. : : > That might be a good idea: allow an [unsigned] int*size (which : > should be in bits since the standard defines things in terms of : > bits) which, if the size is greater than 32 bits, is ...? The : : Make it 'int:size' to provide textual consitency with bit-feilds. Also, : it shuld be signed. If you want an unsigned, make it 'unsigned int:size'. I thought about using colon but decided against it. Tell me, would: int:16; be a bit field declaration or a field declaration with no members? Obviously the former, but the possibility of confusion is not desirable. It might make the language non-LALR as well. Also, my use of [unsigned] was intended as part of the syntax, to imply that unsigned could be used for the declaration. Sorry for the ambiguity. : > The best way to get this is for some compiler writers to put it : > into their compiler. : : I put something like it into Small-C once, but nobody but me ever saw it. Better would be into something like the Gnu C compiler. Whatever Stallman's political idiocies, the compiler does seem rather well known. The Small-C compiler has the drawback that it isn't a complete implementation of C, that makes it kinda invisible to those of us who have to do real work in C. :-) : I wanna say 'int:9 color' or 'int color:9' and only use up one byte : on a Honeywell or Sperry. Would be nice. Here is an extension to this idea: use short*n to indicate that you want it packed if this is reasonable, and int*n to indicate that you don't care if it is packed. --- Bill novavax!proxftl!bill