Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: A glitch regarding the usual malloc() idiom Date: Sun, 24 Jul 2016 21:20:48 -0700 Organization: None to speak of Lines: 37 Message-ID: References: <4cd22745-22ad-4ac7-bdba-39ffa1c75e13@googlegroups.com> <7d995799-5f23-4784-a62e-ea423de00650@googlegroups.com> <36f1e05e-609e-4e0e-8819-86feee1f4d8c@googlegroups.com> <57933a73.4812875@news.xs4all.nl> <5793c8e5.2941812@news.xs4all.nl> <87oa5n97rz.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="28614"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mZg+WrAypiWDdfXYAfaFw" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:g5d4zKSUW/VcvFmBGkId09YCOqk= sha1:2GOmW+VYoO/jMK6JDO5wjNflyKE= Xref: csiph.com comp.lang.c:90960 Richard Heathfield writes: > On 25/07/16 03:09, Keith Thompson wrote: >> Richard Heathfield writes: >> [...] >>> Don't be such an ass. James Kuyper is a very experienced and >>> knowledgeable C programmer. Of course he knows the difference between >>> bits and bytes. But in this case it doesn't matter, because padding >>> bytes are just rather CHAR_BIT-wide collections of padding bits. His >>> point stands either way. >> >> Richard, I regret that I must correct you. > > Go for it. :-) > >> The standard does not use >> the term "padding bytes" when discussing storage within an integer >> object that does not contribute to its value. > > Yes, I know that. It does use the term "padding bytes" in connection > with unions and structs, but not in connection with integers. But the > term "padding bytes" is neither important nor indeed relevant. The claim > Mr Stuckle made is that sizeof(short) cannot exceed sizeof(int), and it > is this claim that I am addressing. Oh, well of course he's wrong about that. Sounds like the issue of "padding bytes" was introduced (deliberately or not) as a red herring. There can be arbitrarily many padding *bits* (which may or may not form bytes). [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"