User account creation filtered due to spam.

Bug 31586

Summary: -falign-X and -fno-align-X flags have reversed meaning
Product: gcc Reporter: Kenneth Hoste <kenneth.hoste>
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Status: UNCONFIRMED ---    
Severity: normal CC: gcc-bugs, kenneth.hoste
Priority: P3    
Version: 4.1.2   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Kenneth Hoste 2007-04-16 10:17:28 UTC
The documentation mentions: 


"-fno-align-functions and -falign-functions=1 are equivalent and mean that functions will not be aligned."

"If n is not specified or is zero, use a machine-dependent default."

But, it seems the semantics are reversed when using -fno-align-functions and -falign-functions. In gcc/opts.c:handle_option, the value variable is set to 1 by default (for -f<flag> flags), and to 0 for -fno-<flag> flags. Sadly, this should be reversed for falign-X flags: 1 should be used for -fno-align-X and 0 for -falign-X . 

This affects -falign-functions, -falign-jumps, -falign-labels and -falign-loops, and should be fairly easy to solve to flip the value of 'value' in handle_option for the -falign-X flags.