c/10339: strncmp generates imPure code

Hans-Peter Nilsson hp@bitrange.com
Tue Apr 8 01:56:00 GMT 2003


The following reply was made to PR optimization/10339; it has been noted by GNATS.

From: Hans-Peter Nilsson <hp@bitrange.com>
To: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Cc: Wolfgang Bangerth <bangerth@ices.utexas.edu>, 
    Michael Ubell <ubell@mindspring.com>,  <gcc-bugs@gcc.gnu.org>, 
     <gcc-gnats@gcc.gnu.org>
Subject: Re: c/10339: strncmp generates imPure code
Date: Mon, 7 Apr 2003 21:51:38 -0400 (EDT)

 On 7 Apr 2003, Falk Hueffner wrote:
 > This optimiziation would only be invalid if
 >
 > * it gives a different result,
 > * or the memory read straddles a page boundary and faults.
 
 Or
   * you use a tool such as valgrind to execute the code
     (a variant of the first item).
 
 (yeah, yeah, this wasn't about i*86...  Replace "valgrind"
 with "purify"  or similar.)
 
 brgds, H-P
 



More information about the Gcc-prs mailing list