This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Better comment of optimize_size



[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]