Dmitri Gribenko <gribozavr at gmail.com> writes:> Also, you don't need to do a 2-step bootstrap to catch warnings from > gcc. You also don't need a debug build, just an optimized one -- > since it is faster to link, and gcc emits more warnings when > optimization is no.Actually, there are cases a debug build catches that an optimized build doesn't because different code is built. I have seen this happy many times. -David
On Mon, Jan 28, 2013 at 11:01 PM, <dag at cray.com> wrote:> Dmitri Gribenko <gribozavr at gmail.com> writes: > >> Also, you don't need to do a 2-step bootstrap to catch warnings from >> gcc. You also don't need a debug build, just an optimized one -- >> since it is faster to link, and gcc emits more warnings when >> optimization is no. > > Actually, there are cases a debug build catches that an optimized build > doesn't because different code is built. I have seen this happy many > times.We don't #ifdef in LLVM and Clang outside portability headers, so this should not be a big issue. Dmitri -- main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
Dmitri Gribenko <gribozavr at gmail.com> writes:>> Actually, there are cases a debug build catches that an optimized build >> doesn't because different code is built. I have seen this happy many >> times. > > We don't #ifdef in LLVM and Clang outside portability headers, so this > should not be a big issue.Well, it is because I see it. :) -David
On Mon, Jan 28, 2013 at 4:03 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:> We don't #ifdef in LLVM and Clang outside portability headers, so this > should not be a big issue.Theoretically this should be the case, but in practice it is not. For example, there is the "enable dump" stuff, and platform-specific #ifdef's in quite a few places outside of the System library. There are also plenty of #ifndef NDEBUG for places where assert() (just one expression) is too limiting. -- Sean Silva