The one and only objection to C

David Herron, NPR Lover david at ukma.UUCP
Thu Dec 27 12:02:35 AEST 1984


> From: bing at galbp.UUCP (Bing Bang)
> Newsgroups: net.lang.c
> Subject: The one and only objection to C
> Message-ID: <69 at galbp.UUCP>
> Date: Thu, 20-Dec-84 17:17:35 EST

> I love C. I think it's by far the best compiler based language that has ever
> been produced.
So do I.  C++ looks real neat though.

> I only have minor complaint:
> why in the world does most C compilers insist on padding structures?
>
> I am currently working on a network driver that needs to handle a data
> packet that has a precise structure to it. It's easy to describe the
> structure in C, but if the compiler puts in padding between fields, I can't
> simply read in a packet on top of a structure. I must instead "jump" over
> the padding bytes both going and comming.

Huh?  I just looked at the proposed standard.  It states that the
sizeof a structure includes anything needed for padding, whether
internal or external.  I don't see why any compiler would implement
this differently.  

Ok, just engaged mind before (during anyway) writing.  Ok.  They
do it because not all machines are byte addressed.  Or have restrictions
as to where ints are placed.  That answer your question?

> "No, you stupid computer, do what I mean, not what I type!"
> ...akgua!galbp!bing


--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:-
David Herron;  ARPA-> "ukma!david"@ANL-MCS
(Try the arpa address w/ and w/o the quotes, I have had much trouble with both.)

UUCP          -:--:--:--:--:--:--:--:--:-          (follow one of these routes)

{ucbvax,unmvax,boulder,research} ! {anlams,anl-mcs} -----\  vvvvvvvvvvv
							  >-!ukma!david
   {cbosgd!hasmed,mcvax!qtlon,vax135,mddc} ! qusavx -----/  ^^^^^^^^^^^



More information about the Comp.lang.c mailing list