This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] Fix main return type checking (PR c++/29735)
On Tue, Nov 21, 2006 at 10:12:59AM -0800, Mark Mitchell wrote:
> > In any case, perhaps swapping the check_explicit_specialization
> > and cplus_decl_attributes calls in grokfndecl wouldn't be a bad idea.
> My suggestion is to move the attribute stuff right before "if (check <
> 0)". (Because the other stuff, like DECL_EXTERNAL, etc., might be
> relevant to the attribute handlers.)
> Then, move the check for valid
> "main" (not just the return type, but all of those checks) after attributes.
This is a problem, since some of the "main" checks set publicp and inlinep
and a whole bunch of things use those 2 in between the current "main" checks
and if (check < 0). The check_main_parameter_types call can be moved to
where I had the "main" return type check though.