Hi Paweł, On Thu, 29 Apr 2010, Paweł Sikora wrote: >> The standard 1st questions are: >> 1) Did you compile with -Wall -Wextra and solve all warnings? >> 2) Did you try with -fno-strict-aliasing? > for legacy code, the '-fwrapv' could be helpful.
your mail reminded me that we could/should clarify this in our bug reporting instructions. The patch below, which I just committed, does that. Thanks for the hint! Gerald Index: bugs/index.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/bugs/index.html,v retrieving revision 1.107 diff -u -r1.107 index.html --- bugs/index.html 24 Apr 2011 09:51:55 -0000 1.107 +++ bugs/index.html 25 Apr 2011 20:58:56 -0000 @@ -51,10 +51,11 @@ <a href="#known">list of well-known bugs</a> and, <strong>if possible, try a current release</strong> or development snapshot.</p> -<p>Before reporting that GCC compiles your code incorrectly, please -compile it with <code>gcc -Wall -Wextra</code> and see whether this shows -anything wrong with your code that could be the cause instead of a bug -in GCC.</p> +<p>Before reporting that GCC compiles your code incorrectly, compile it +with <code>gcc -Wall -Wextra</code> and see whether this shows anything +wrong with your code. Similarly, if compiling with +<code>-fno-strict-aliasing -fwrapv</code> makes a difference, your code +probably is not correct.</p> <h2>Summarized bug reporting instructions</h2>