Message from discussion
Accessing bit fields of a structure
Path: g2news2.google.com!news4.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!nwrddc01.gnilink.net.POSTED!2061b04a!not-for-mail
From: James Kuyper <jameskuy...@verizon.net>
User-Agent: Thunderbird 1.5.0.12 (X11/20071019)
MIME-Version: 1.0
Newsgroups: comp.lang.c
Subject: Re: Accessing bit fields of a structure
References: <d8b953e2-575a-47f6-9fed-4069765a7f8d@p5g2000pre.googlegroups.com> <h15352$dfj$1@news.eternal-september.org> <8fa2689d-7d05-4a27-9420-3ccb42591189@d25g2000prn.googlegroups.com>
In-Reply-To: <8fa2689d-7d05-4a27-9420-3ccb42591189@d25g2000prn.googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 20
Message-ID: <dapZl.2489$u86.1106@nwrddc01.gnilink.net>
Date: Mon, 15 Jun 2009 10:14:33 GMT
NNTP-Posting-Host: 173.66.185.51
X-Complaints-To: abuse@verizon.net
X-Trace: nwrddc01.gnilink.net 1245060873 173.66.185.51 (Mon, 15 Jun 2009 06:14:33 EDT)
NNTP-Posting-Date: Mon, 15 Jun 2009 06:14:33 EDT
James Dow Allen wrote:
...
> The reason I'm following up is that *I continue to believe*
> that some "C lawyers" insist on coding for compilers that
> are about as real as the Tooth Fairy.
When I write C code, I write it for compilers which conform fully to the
C standard. I refuse to write C code which make assumptions about
matters that the C standard leaves unspecified unless they are instead
specified as part of the requirements for the program I'm writing. Some
of the assumptions I refuse to make might be violated only by compilers
no more real than the Tooth Fairy; but that doesn't mean I'm actually
coding for such compilers. I suspect that such assumptions are rarer
than you think they are; in many cases, compilers violating the
assumption are only as unreal as gcc 6.0.0 - i.e. they are compilers
that haven't been written yet, but might get written before the lifetime
of my code ends.
I just find it easier to follow a consistent rule, than to evaluate each
possible deviation from that rule for it's likelihood of causing problems.