Article View: comp.std.c
Article #4247Re: Variable length struct hack
From: Christopher R. Volpe
Date: Thu, 19 Oct 1995 13:56
Date: Thu, 19 Oct 1995 13:56
19 lines
1305 bytes
1305 bytes
In some article (Christopher R. Volpe), i.e. me, writes: > >> >>The standard says that the return value of malloc is suitably aligned so >>that it can be assigned to a pointer of any kind. I guess they meant `without >>information loss'. > >Since the return type is "void *", it is guaranteed that converting this type >to any other pointer-to-object-or-incomplete-type will not lose information. Blech. I just read my post and realized I got that back-asswards. It is guaranteed not to lose information, but certainly not because of the void* return type. The alignment guarantees this. Sorry about that. -- Chris Volpe Phone: (518) 387-7766 (Dial Comm 8*833 GE Corporate R&D Fax: (518) 387-6560 PO Box 8, Schenectady, NY 12301 Email: volpecr@crd.ge.com
Technical Details
Message-ID:
<465lel$eb5@rdsunx.crd.ge.com>Path:
arc1-ca.pugleaf.net!bart.crd.ge.com!volpeReferences:
<463egk$jbb@nntp.Stanford.EDU> <463lpa$qgo@newshost.lanl.gov> <46449u$nb2@rdsunx.crd.ge.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!bart.crd.ge.com!volpe From: volpe@bart.crd.ge.com (Christopher R. Volpe) Newsgroups: comp.std.c Subject: Re: Variable length struct hack Date: 19 Oct 1995 13:56:37 GMT Organization: GE Corporate Research & Development Sender: volpe@bart (Christopher R. Volpe) Distribution: world Message-ID: <465lel$eb5@rdsunx.crd.ge.com> References: <463egk$jbb@nntp.Stanford.EDU> <463lpa$qgo@newshost.lanl.gov> <46449u$nb2@rdsunx.crd.ge.com> Reply-To: volpe@ausable.crd.ge.com NNTP-Posting-Host: bart.crd.ge.com