Re: Isn't it time there was a standard align statement?



<artifact.one@xxxxxxxxxxxxxx> wrote in message
news:1168715750.406199.266770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
It'd be really pleasant (in my opinion) if the next revision of the
C language actually allowed some portable control over data
alignment.

It just seems that this really should be standardized as it clearly
is useful for a vast number of programmers who need to get close to the
hardware but don't want to stray into assembly code (think Altivec,
SSE).
Sounds like EXACTLY the point of the C language, doesn't it?

Your post is rather general and doesn't give a specific example of a
scenario where the current C mechanisms are inadequate.

Please don't make general criticisms of the language. Instead, post a
specific example of some effect or end-result you are trying to achieve and
why you believe you can't do it with the current mechanisms.

I've always found the current mechanisms to be adequate. Where alignment is
unknown or you need to do double-duty with a pointer, just define a variant
record and let the compiler figure it out ...


.



Relevant Pages

  • Re: Isnt it time there was a standard align statement?
    ... Sounds like EXACTLY the point of the C language, ... post a specific example of some effect or end-result you are trying to achieve and why you believe you can't do it with the current mechanisms. ... Where alignment is unknown or you need to do double-duty with a pointer, just define a variant record and let the compiler figure it out ... ... Doing so is one of the ways in which "64-bit" operating systems distinguish themselves, and are likely to obsolete those which don't, faster than any standards could be adopted. ...
    (comp.lang.c)
  • Re: And the question was? (Re: Amazing, two new articles on Computerworld.com actual mention OpenVMS
    ... took alignment into consideration and included alignment instructions ... so does COBOL. ... As a member of a standards committee, it is hard for a language to ... Allowing/requiring the human to "help" the compiler produce code on some ...
    (comp.os.vms)
  • Re: Isnt it time there was a standard align statement?
    ... C language actually allowed some portable control over data ... /* per member alignment (obviously padding before the first ... fatal with compiler specific switches - and that's no business of the ...
    (comp.lang.c)
  • Re: Compiling C++ kernel module + Makefile
    ... C++ was designed as an object-oriented language. ... the details of the actual execution mechanisms ... and the actual execution paths. ... the Operating System programmer makes ...
    (Linux-Kernel)
  • Re: And the question was? (Re: Amazing, two new articles on Computerworld.com actual mention OpenVMS
    ... took alignment into consideration and included alignment instructions ... COBOL and PL/I ... I still think tyhe programmer should ... Not really part of any language ...
    (comp.os.vms)