Gentoo Archives: gentoo-user

From: Mike Edenfield <kutulu@××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] -Os = Nono?
Date: Mon, 23 Jul 2007 21:59:30
Message-Id: 46A52266.6040104@kutulu.org
In Reply to: Re: [gentoo-user] -Os = Nono? by Benno Schulenberg
1 Benno Schulenberg wrote:
2
3 > Although I agree with your reasoning above, you are contradicting
4 > yourself in the following two statements:
5 >
6 >> At least, it's no more broken under -Os than under -O2.
7 >> [...] benefits of using -Os over -O2 are minimal
8 >> compared against the possible problems it might cause.
9 >
10 > If -Os is no more broken than -O2, then it shouldn't cause any extra
11 > problems. :)
12
13 True, this is a contradiction, but only in the sense that I failed to
14 distinguish between the general case of "most things" that used to break
15 under -Os don't break anymore, vs. the specific cases where the two
16 settings actually do differ. Obviously, O2 and Os are using a different
17 set of optimizations. In most cases the code is the same, so if there's
18 a problem with the resulting code, it's probably not the compiler's
19 fault. But there are always going to be corner cases where some extra
20 space-saving optimization does something unintended, or exposes some
21 bug, that O2 does not.
22
23 --K
24
25 --
26 gentoo-user@g.o mailing list