This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Better comment of optimize_size
- To: Geoff Keating <geoffk at redhat dot com>
- Subject: Better comment of optimize_size
- From: Cosmin Truta <cosmin at cs dot toronto dot edu>
- Date: Fri, 16 Mar 2001 17:19:43 -0500 (EST)
- cc: gcc-patches at gcc dot gnu dot org, cosmint at cs dot ubbcluj dot ro
[was Re: -Os should default optimize to 2, without enforcing it]
On Sat, 10 Mar 2001, Geoff Keating wrote:
> The documentation says
>
> If you use multiple @samp{-O} options, with or without level numbers,
> the last such option is the one that is effective.
>
> (this is right after the description of -Os)
> so what's supposed to happen is that -O1 -Os means the same thing as -Os.
Now I see.
As I was mislead by the comment of optimize size, I would suggest to
slightly modify it in toplev.c, to accomodate with what the doc says and
to what it does.
The patch:
Index: gcc/gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.420.2.6
diff -c -3 -p -r1.420.2.6 toplev.c
*** toplev.c 2001/03/02 19:51:59 1.420.2.6
--- toplev.c 2001/03/16 22:05:59
*************** int optimize = 0;
*** 380,387 ****
/* Nonzero means optimize for size. -Os.
The only valid values are zero and non-zero. When optimize_size is
! non-zero, optimize defaults to 2, but certain individual code
! bloating optimizations are disabled. */
int optimize_size = 0;
--- 380,387 ----
/* Nonzero means optimize for size. -Os.
The only valid values are zero and non-zero. When optimize_size is
! non-zero, optimize is set to 2, and certain individual code bloating
! optimizations are disabled. */
int optimize_size = 0;
The ChangeLog entry:
Fri 16 Mar 2001 Cosmin Truta <cosmint@cs.ubbcluj.ro>
* toplev.c (optimize_size): Correct its comment.
Congratulations for the gcc-2.95.3 release!
Cosmin