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]
Other format: [Raw text]

Re: [PATCH] PR/11368 clearer documentation on -falign-*


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:


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