🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4307

Re: Variable length struct hack

#4307
From: Christopher R. Volpe
Date: Mon, 30 Oct 1995 15:48
25 lines
1319 bytes
In article <BMckwQ9ythGC084yn@csn.net>, thads@csn.net (Thad Smith) writes:
>In article <46qm6e$bba@rdsunx.crd.ge.com>,
>volpe@bart.crd.ge.com (Christopher R. Volpe) wrote:
>...
>>>If tail_size < sizeof(struct s_t), can tail_of() fail because of the +1?
>
>>Correct. 
>
>Why?  ANSI Classic 3.3.6 explicitly allows a pointer to be one past
>the last element.

You deleted some important context before my "Correct.". The point that I said
was "correct" was that the pointer can have bounds information attached to it
that prevents it from accessing the whole array.






--

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: <472s3u$j6d@rdsunx.crd.ge.com>
Path: arc1-ca.pugleaf.net!bart.crd.ge.com!volpe
References: <463egk$jbb@nntp.Stanford.EDU> <DH0uG2.Ft@eskimo.com> <DH220v.9r@thinkage.on.ca> <46qm6e$bba@rdsunx.crd.ge.com> <BMckwQ9ythGC084yn@csn.net>

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: 30 Oct 1995 15:48:14 GMT
Organization: GE Corporate Research & Development
Sender: volpe@bart (Christopher R. Volpe)
Distribution: world
Message-ID: <472s3u$j6d@rdsunx.crd.ge.com>
References: <463egk$jbb@nntp.Stanford.EDU> <DH0uG2.Ft@eskimo.com>  <DH220v.9r@thinkage.on.ca> <46qm6e$bba@rdsunx.crd.ge.com> <BMckwQ9ythGC084yn@csn.net>
Reply-To: volpe@ausable.crd.ge.com
NNTP-Posting-Host: bart.crd.ge.com