public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/31586]  New: -falign-X and -fno-align-X flags have reversed meaning
@ 2007-04-16  9:17 kenneth dot hoste at elis dot ugent dot be
  0 siblings, 0 replies; only message in thread
From: kenneth dot hoste at elis dot ugent dot be @ 2007-04-16  9:17 UTC (permalink / raw)
  To: gcc-bugs

The documentation mentions: 

-falign-functions=n

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

"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.


-- 
           Summary: -falign-X and -fno-align-X flags have reversed meaning
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kenneth dot hoste at elis dot ugent dot be


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31586


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-16  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-16  9:17 [Bug preprocessor/31586] New: -falign-X and -fno-align-X flags have reversed meaning kenneth dot hoste at elis dot ugent dot be

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).