This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR/11368 clearer documentation on -falign-*
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Jim Wilson <wilson at tuliptree dot org>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 4 Jul 2003 22:42:44 +0100
- Subject: Re: [PATCH] PR/11368 clearer documentation on -falign-*
- References: <7A86E326-AA34-11D7-B3D8-000393A6D2F2@physics.uc.edu> <3F05303F.6050702@tuliptree.org>
Jim Wilson wrote:-
> -falign-functions and -fno-align-functions are not working properly.
> The first one should set align_functions to 0, and the second one should
> set it to 1. They do the opposite. I noticed this because Andrew
> Pinski is trying to fix a documentation problem for PR 11368, and I
> tried the options to see what they do.
>
> The same is true for all of the other -falign-* options.
>
> If you look at 3.3 toplev.c, you can see that the default values for
> these options are 0, and hence they need some kind of special handling
> in your new code.
Oops, thanks for pointing this out. I checked the other switches
defaulting to 0, and they were all OK. I'll apply this.
Neil.
* opts.c (common_handle_options): Negate sense of -falign- switches.
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.21
diff -u -p -r1.21 opts.c
--- opts.c 2 Jul 2003 20:15:37 -0000 1.21
+++ opts.c 4 Jul 2003 21:37:56 -0000
@@ -789,22 +789,22 @@ common_handle_option (size_t scode, cons
case OPT_falign_functions:
case OPT_falign_functions_:
- align_functions = value;
+ align_functions = !value;
break;
case OPT_falign_jumps:
case OPT_falign_jumps_:
- align_jumps = value;
+ align_jumps = !value;
break;
case OPT_falign_labels:
case OPT_falign_labels_:
- align_labels = value;
+ align_labels = !value;
break;
case OPT_falign_loops:
case OPT_falign_loops_:
- align_loops = value;
+ align_loops = !value;
break;
case OPT_fargument_alias: