Hi,

On 08/21/2015 05:37 PM, Jason Merrill wrote:
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?
Ah nice. Simply checking:

    scope == global_namespace

appears to work great. Shall I go with that if testing is fine?

Thanks!
Paolo.

Reply via email to