[C++ Patch] PR 67065 ("Missing diagnostics for ill-formed program with main variable instead of function")
Jason Merrill
jason@redhat.com
Fri Aug 21 15:44:00 GMT 2015
On 08/21/2015 05:06 AM, Paolo Carlini wrote:
> if (DECL_NAME (decl)
> && MAIN_NAME_P (DECL_NAME (decl))
> - && CP_DECL_CONTEXT (decl) == global_namespace)
> + && CP_DECL_CONTEXT (decl) == global_namespace
> + && !at_function_scope_p ())
How about looking at the "scope" local variable instead of CP_DECL_CONTEXT?
Jason
More information about the Gcc-patches
mailing list