home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12843 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.5 KB  |  38 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!wupost!sdd.hp.com!apollo.hp.com!cupnews0.cup.hp.com!scd.hp.com!hpscdm!hpuerca.atl.hp.com!aaa
  3. From: aaa@hpuerca.atl.hp.com (Simon Fowler)
  4. Subject: Re: Casting from loose to strict alignment - what does this mean?
  5. Sender: news@hpuerca.atl.hp.com ( News admin)
  6. Message-ID: <BxM4E3.Io8@hpuerca.atl.hp.com>
  7. Date: Thu, 12 Nov 1992 16:56:27 GMT
  8. References:  <1992Nov12.075922.1442@codex.oz.au>
  9. Organization: Hewlett-Packard Company, Atlanta GA
  10. Lines: 26
  11.  
  12. In article <1992Nov12.075922.1442@codex.oz.au>, bpja@codex.com.au (Brett Adam) writes:
  13. > Ok, I'm beginning to clutch at straws but my memory problems have me somewhat  
  14. > annoyed. The following applies to HP 700 series.
  15. > With all warnings on (+w1) using cc in ansi mode, I'm getting occasional  
  16. > warnings of the following nature:
  17. > cc: "ni_glue.c", line 767: warning 530: Casting from loose to strict alignment.
  18. > Does anyone have a precise definition of what this means/indicates? I'm new to  
  19. > the HP environment and am unsure as to how important this may be in the scheme  
  20. > of things.
  21.  
  22. "Your program casts a pointer variable whose type is of looser alignment to a pointer
  23. whose type is of stricter alignment."
  24.  
  25. e.g. casting from a (char *) to a (double *)
  26.  
  27. "Using this construct is prone to run-time problems(such as bus errors) because of
  28. the alignment of the pointer's type not matching the alignment of the pointer's
  29. value. Such conversions should not be used.
  30. ANSI 3.3.4"
  31.  
  32. simon
  33.  
  34. Quotes from HPC Reference Manual.
  35.