Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #10200

Re: C Macro define contain symbol #

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c
Subject Re: C Macro define contain symbol #
Date 2011-09-14 07:55 +1200
Message-ID <9d9qp0F784U3@mid.individual.net> (permalink)
References <c351b443-5581-4db0-8760-3f117eebce77@x32g2000prf.googlegroups.com> <j4ngch$oqb$1@dont-email.me> <92iu67h2ki8sgm1u9bvpfk8qu3hfremcoo@4ax.com>

Show all headers | View raw


On 09/14/11 12:24 AM, Roberto Waltman wrote:
> Eric Sosman wrote:
>>      ... if you really think you need "pack(1)".  Usually (not always,
>> but usually) that's the sign of a short-term hack leading to long-
>> term headaches.
>
> Not when you are dealing with communication protocols, mapping
> hardware control registers in embedded systems, etc.
> Without the "pack" pragmas, instead of having a structure that
> directly overlaps the desired memory layout, the packing/unpacking
> would have to be in higher level software.
> This is a much needed functionality, and I am puzzled why it never
> became part of the language standard, instead of a not always
> available compiler extension.

Try using "pack(1)" on something like Sparc that does not allow 
misaligned access....

-- 
Ian Collins

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C Macro define contain symbol # Wang WolfLouis <wolflouiswang@gmail.com> - 2011-09-13 02:47 -0700
  Re: C Macro define contain symbol # Noob <root@127.0.0.1> - 2011-09-13 13:14 +0200
  Re: C Macro define contain symbol # Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-13 07:55 -0400
    Re: C Macro define contain symbol # Roberto Waltman <usenet@rwaltman.com> - 2011-09-13 08:24 -0400
      Re: C Macro define contain symbol # Keith Thompson <kst-u@mib.org> - 2011-09-13 11:12 -0700
        Re: C Macro define contain symbol # Keith Thompson <kst-u@mib.org> - 2011-09-13 20:19 -0700
          Re: C Macro define contain symbol # Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-16 00:43 +0300
            Re: C Macro define contain symbol # Keith Thompson <kst-u@mib.org> - 2011-09-15 18:34 -0700
        Re: C Macro define contain symbol # Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-13 22:51 -0400
          Re: C Macro define contain symbol # Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-14 12:16 +0100
      Re: C Macro define contain symbol # tom st denis <tom@iahu.ca> - 2011-09-13 11:20 -0700
      Re: C Macro define contain symbol # Ian Collins <ian-news@hotmail.com> - 2011-09-14 07:55 +1200
      Re: C Macro define contain symbol # Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-14 07:58 -0400
        Re: C Macro define contain symbol # Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-09-14 14:54 +0000
      Re: C Macro define contain symbol # Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-16 00:34 +0300
        Re: C Macro define contain symbol # Nobody <nobody@nowhere.com> - 2011-09-16 12:07 +0100
    Re: C Macro define contain symbol # "BartC" <bc@freeuk.com> - 2011-09-13 13:50 +0100
      Re: C Macro define contain symbol # James Kuyper <jameskuyper@verizon.net> - 2011-09-13 08:59 -0400
        Re: C Macro define contain symbol # Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-09-14 15:02 +0000
  Re: C Macro define contain symbol # Kenneth Brody <kenbrody@spamcop.net> - 2011-09-13 16:54 -0400

csiph-web