<br><br><div class="gmail_quote">On Sun, Nov 9, 2008 at 6:51 PM, Erik Lindahl <span dir="ltr">&lt;<a href="mailto:lindahl@cbr.su.se">lindahl@cbr.su.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div class="Ih2E3d"><br><div><div>On Nov 9, 2008, at 11:01 PM, Roland Schulz wrote:</div><blockquote type="cite"><div class="gmail_quote"><div><br>I&#39;m not sure. But I think it is little bit different. <br>
<br>Parameters with <b>different</b> types are <b>not allowed</b> to point to the same memory. <br>Parameters with <b>the same</b> types are <b>allowed</b> to point to the same memory. <br> Parameters with <b>the same</b> types declared <b>restricted</b> are <b>not allowed</b> to point to the same memory.<br>
</div></div></blockquote></div><br></div><div>You&#39;re probably right, and that makes it even more safe. We had to work a bit to fulfill this, in particular in cases where we (for good reasons, alignment manipulation) need to covert a pointer to a void, add to it, and then move it back to the pointer type (which the Intel compiler considered breaking aliasing rules).</div>
</div></blockquote><div><br>I think what would help in finding compiler problems is to fix the few places where the compiler produce warnings and then compile with -Werror by default. This way people will write bug reports when the use different compilers. Warning will be overlooked.<br>
<br>Currently I get the following 3 warning for gcc 4.3.1:<br>futil.c: In function 'get_libdir':<br>futil.c:412: warning: the address of 'bin_name' will always evaluate as 'true'<br><br>gen_ad.c: In function 'gen_pad':<br>
gen_ad.c:512: warning: array subscript is above array bounds<br>gen_ad.c:514: warning: array subscript is above array bounds<br>gen_ad.c:516: warning: array subscript is above array bounds<br>gen_ad.c:517: warning: array subscript is above array bounds<br>
gen_ad.c:516: warning: array subscript is above array bounds<br>gen_ad.c:514: warning: array subscript is above array bounds<br>gen_ad.c:512: warning: array subscript is above array bounds<br>gen_ad.c:517: warning: array subscript is above array bounds<br>
gen_ad.c:512: warning: array subscript is above array bounds<br>gen_ad.c:514: warning: array subscript is above array bounds<br>gen_ad.c:516: warning: array subscript is above array bounds<br>gen_ad.c:517: warning: array subscript is above array bounds<br>
<br>resall.c: In function 'read_atype':<br>resall.c:73: warning: the address of 'buf' will always evaluate as 'true'<br>resall.c:77: warning: the address of 'buf' will always evaluate as 'true'<br><br>BTW: Of course -Wall with -fstrick-align gives warnings not with -fnostrick-align. I had that the other way around in the last mail.<br>
<br>Roland<br></div></div><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a><br>