home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sdd.hp.com!uakari.primate.wisc.edu!ames!pasteur!cory.Berkeley.EDU!johnm
- From: johnm@cory.Berkeley.EDU (John D. Mitchell)
- Newsgroups: comp.std.c
- Subject: Scalars and Structs
- Keywords: casts
- Message-ID: <1992Jul30.205601.13276@pasteur.Berkeley.EDU>
- Date: 30 Jul 92 20:56:01 GMT
- Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
- Organization: University of California, at Berkeley
- Lines: 17
- Nntp-Posting-Host: cory
-
- ANSI X3.159-1989:
- Section 3.3.4 Cast Operators:
- Constraints:
- "Unless the type name specifies void type, the type
- name shall specify qualified or unqualified scalar
- type and the operand shall have scalar type."
-
- Am I correct in taking this to mean that there is no way to cast a
- structure of known size to a scalar that just so happens to have the same
- size (or vice versa)?
-
- Is the right thing to do is to use a union? Or is there a better solution.
-
-
- Thanks,
- John
- johnm@cory.Berkeley.EDU
-