home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- 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
- From: aaa@hpuerca.atl.hp.com (Simon Fowler)
- Subject: Re: Casting from loose to strict alignment - what does this mean?
- Sender: news@hpuerca.atl.hp.com ( News admin)
- Message-ID: <BxM4E3.Io8@hpuerca.atl.hp.com>
- Date: Thu, 12 Nov 1992 16:56:27 GMT
- References: <1992Nov12.075922.1442@codex.oz.au>
- Organization: Hewlett-Packard Company, Atlanta GA
- Lines: 26
-
- In article <1992Nov12.075922.1442@codex.oz.au>, bpja@codex.com.au (Brett Adam) writes:
- > Ok, I'm beginning to clutch at straws but my memory problems have me somewhat
- > annoyed. The following applies to HP 700 series.
- >
- > With all warnings on (+w1) using cc in ansi mode, I'm getting occasional
- > warnings of the following nature:
- >
- > cc: "ni_glue.c", line 767: warning 530: Casting from loose to strict alignment.
- >
- > Does anyone have a precise definition of what this means/indicates? I'm new to
- > the HP environment and am unsure as to how important this may be in the scheme
- > of things.
-
- "Your program casts a pointer variable whose type is of looser alignment to a pointer
- whose type is of stricter alignment."
-
- e.g. casting from a (char *) to a (double *)
-
- "Using this construct is prone to run-time problems(such as bus errors) because of
- the alignment of the pointer's type not matching the alignment of the pointer's
- value. Such conversions should not be used.
- ANSI 3.3.4"
-
- simon
-
- Quotes from HPC Reference Manual.
-