C standards and committees (was Re: strangest systems I've sent email from)

Eric Smith spacewar at gmail.com
Sat May 21 18:56:41 CDT 2016


On Sat, May 21, 2016 at 9:59 AM, Guy Sotomayor Jr <ggs at shiresoft.com> wrote:
>> On May 21, 2016, at 4:33 AM, Mouse <mouse at Rodents-Montreal.ORG> wrote:
>>> First off, the C standard mandates that the order of fields in a
>>> struct cannot be reordered,
>> Yes.  (I think this is a Bad Thing, but I can see why they did it.)
> Given that C is a systems implementation language, how would you
> define HW related data structures where the order of the fields is
> critical (ie HW defines them).
[...]
> My biggest complaint about the C standard is that the order that bits
> within a bit field are compiler defined.  This basically means that they
> are completely unusable for anything that requires interoperability.

Agreed. It was a solved problem in Ada back in 1983, so I don't know
why the C committees couldn't have solved it in ANSI C in  1989, or
ISO C in 1990, 1995, 1999, or 2011.  Maybe the C committee is no
longer concerned with use of C for low-level systems programming?
(Though IMNSHO that's the only thing that it's even vaguely reasonable
for.)

Admittedly representation specifications are an *optional* part of
Ada, but any Ada compiler intended for systems programming use would
support them.


More information about the cctalk mailing list