[Bug c/40172] [4.5 Regression] Revision 147596 breaks bootstrap

meissner at linux dot vnet dot ibm dot com gcc-bugzilla@gcc.gnu.org
Mon May 18 22:56:00 GMT 2009



------- Comment #16 from meissner at linux dot vnet dot ibm dot com  2009-05-18 22:56 -------
Just to chime in, the warning is a useful warning, but the way rs6000 and mips
define FRAME_GROWS_DOWNWARD, the test in toplev.c will never succeed.  

I can see a couple of ways to fix this:
1) Revert the patch that moves this warning to -Wextra.  I think this is a bad
idea, since the warning does seem to be useful.

2) Disable the check in toplev.c.  Again, I think this is useful in general,
but as an immediate palative, it can be useful.

3) Add a new macro to say not to do the test in #2, and define it in mips and
rs6000.  This is doable, but in general it is not a good idea to add new global
macros like this.

4) Change mips and rs6000 to have a global variable that is what
FRAME_GROWS_DOWNWARD should be.  This is certainly doable.  The test will be
tested at runtime, but never invoke the error message.

5) Move FRAME_GROWS_DOWNWARD (and STACK_GROWS_DOWNWARD, etc.) into the target
structure, and set the field in the target structure from the macro.  I tend to
like this (and eventually move backends to set the field directly and get rid
of the macros).  I tend to like this idea best.


-- 

meissner at linux dot vnet dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |meissner at linux dot vnet
                   |                            |dot ibm dot com


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



More information about the Gcc-bugs mailing list