Re: Warning: The structure contains misaligned fields



Craig Powers <enigma@xxxxxxxxxx> wrote:

jamesgiles@xxxxxxx wrote:
But both the above have to interoperate
with:

integer :: ivar(6)
common /aBlock/ ivar

Yeah, that comes back to "depending on what restrictions are imposed on
COMMON." I wasn't certain of what those were, and I was too lazy to
look them up, but it does look like the COMMON side of thing enforces
SEQUENCE to impose order as a practical matter.

Only directly for numeric sequence and character sequence, which is a
pretty restricted set. But I do find it a bit hard to imagine an
implementation actually using different rules for numeric and character
sequence than for other sequence types. Padding differences are
plausible, but padding to numeric storage unit boundaries doesn't come
up in numeric sequence anyway (padding to greater boundaries would be a
different matter).

In the end, I come to the same conclusion - that SEQUENCE is likely to
imply ordering (though not lack of padding) as a practical matter. I
just note that there is an extra step of the deduction for non-numeric
and non-character sequence types. Reordering them wouldn't be as
impractical... to the extent that I might imagine it happening, though
odds seem against it.

There just might be compilers that notice special cases like types that
aren't used in common or otherwhere that it matters. Seems odd to me to
special-case that, but I'm thinking I recall someone (Bob Corbett
perhaps?) mentioning such special casing. I might well misrecall.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • Re: Cohens paper on byte order
    ... > depend on the applicability of the common hex notation. ... bit sequence, there is a bit-order-within-unit issue for ... *any* multibit storage units, not just octet units, and ... fact true of almost all data storage and transmission ...
    (sci.crypt)
  • Re: World Moonie Herald: The challenge to Darwins theory of evolution - 5
    ... Denton presented his critique of neo-Darwinism based on the latest ... all types of cytochrome-c is similar and therefore common. ... amino-acid sequence differs according to organisms. ...
    (talk.origins)
  • Re: Cantors definition of set
    ... I would not like to say that they have anything in common. ... of the signs we use to portray numbers, ... arranged in a sequence and not numbers after all? ...
    (sci.logic)
  • Re: Article: On the Origins of Chemical Biodefense
    ... >> There is a controversy in the field of molecular evolution. ... >> of sequence similarity could be lost in regions that must preserve ... > It's very strange to hear Larry arguing for convergence - this is the ... a common and important mechanism of evolution. ...
    (sci.bio.evolution)
  • Re: Page Coloring Defines in vm_page.h
    ... If you generate a sequence ... For every array length n and every stride p, that has no common ... Let's assume that f is not an injection, ... Since array lengths, that are powers of 2, are relatively prime to every ...
    (freebsd-hackers)