This is the mail archive of the gcc-bugs@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]

[Bug optimization/9350] -fomit-frame-pointer does not work for main


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


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