home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,504 of 2,753   
   Hans-Peter Diettrich to All   
   Re: Bounds checking, Optimization techni   
   05 May 19 20:44:35   
   
   From: DrDiettrich1@netscape.net   
      
   Am 05.05.2019 um 12:14 schrieb Bart:   
      
   > But how do they get there? Take this:   
   >   
   >     int A[10], *p;   
   >     p = &A[3];   
   >   
   > You intend p to refer to the 4-element slice A[3..6], but how does the   
   > language know that? How can it stop code from writing to p[5]?   
      
   Not pointers are bad, but pointer arithmetic is. It should be allowed   
   only with objects of known bounds.   
      
   DoDi   
   [In this case the bounds look known to me. -John]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca