🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #20567

Structure member reorganizing

#20567
From: Joseph H Allen
Date: Tue, 28 Mar 1989 19:52
24 lines
1597 bytes
I don't think compilers should do this optomization- It's just another
restriction which complicates things when you try to mix C with assembly
language.  Besides, it's simple enough for the programmer to do it himself. 

What might be usefull, however, is a compiler switch which when activated
makes the compiler give a warning message whenever padding is inserted within
a structure.

On another note, how much of the below is just C junk?  That is, can we live
without this stuff?

How many people use "enum"erations?  I started out programming in assembly
language and then went directly to C (I.E. without stopping at pascal
in between).  So I'm very used to using "defines" ("equates") for this type of
thing.  Being as used to numberic data as I am, I'm not really sure if I'd
like this type of type checking.  (I'm not opposed to "unit" type checking
however)

How many people use C's bit-field operations?

Is there some better syntax to do what "union"s are typically used for?  You
can always just make a different structure definition for each sub-class of
the structure, but then you get a bit hairy with the type casts.
Technical Details
Message-ID: <1560@wpi.wpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!husc6!m2c!wpi!wpi.wpi.edu!jhallen

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!husc6!m2c!wpi!wpi.wpi.edu!jhallen
From: jhallen@wpi.wpi.edu (Joseph H Allen)
Newsgroups: comp.arch
Subject: Structure member reorganizing
Message-ID: <1560@wpi.wpi.edu>
Date: 28 Mar 89 19:52:15 GMT
Sender: jhallen@wpi.wpi.edu
Reply-To: jhallen@wpi.wpi.edu (Joseph H Allen)
Organization: Worcester Polytechnic Institute, Worcester, Mass.
Lines: 24