This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/9350] -fomit-frame-pointer does not work for main
- From: "ctm at ardi dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Dec 2003 16:02:52 -0000
- Subject: [Bug optimization/9350] -fomit-frame-pointer does not work for main
- References: <20030117052601.9350.ctm@ardi.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ctm at ardi dot com 2003-12-03 16:02 -------
If you change main in my example program to xmain, you get the behavior one would expect
without any apriori knowledge about what gcc is going to do.
If gcc wants to treat main specially, that's fine. But if you don't document this special case, the
documentation is incomplete.
Just because main might be used as the entry point to a program doesn't mean that gcc users are
going to guess that this means that main needs a frame pointer. Without special knowledge (e.g.
documentation, examination of the gcc source code, examination of gcc's behavior) a
knowledgable person would assume that whether a function needs a frame pointer or not is a
question that can be resolved without knowing the function's name.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9350