Date: Sun, 30 Aug 1998 17:13:22 +0300 (IDT) From: Eli Zaretskii To: Endlisnis cc: djgpp AT delorie DOT com Subject: Re: Am I retarded -or- Why is my exe size so big?!? In-Reply-To: <35E84B15.F0355D8D@unb.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sat, 29 Aug 1998, Endlisnis wrote: > > Actually it states that -O2 is the best optimizations switch without a > > speed/size tradeoff. > But, -O1,2 or 3 sometimes make programs that don't do what you might > expect/desire. I have a few VERY LONG programs that do not do the same stuff > when compiled with any optimizations on. They are fully ANSI compilent > programs not trying to do anything tricky. It is a bug when a program behaves differently under different optimization switches. Usually, the bug is in the application code, not in the compiler. Unless these programs explore the fine details of machine arithmetics, which AFAIK is the only case when optimizations should NOT be used, you need to debug those programs, I'd say.