2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokvardecl): Simplify the latter.
From-SVN: r227078
+2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (grokvardecl): Simplify the latter.
+
2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokvardecl): Complete check added for c++/67065.
if (DECL_NAME (decl)
&& MAIN_NAME_P (DECL_NAME (decl))
- && CP_DECL_CONTEXT (decl) == global_namespace
- && !at_function_scope_p ())
+ && scope == global_namespace)
error ("cannot declare %<::main%> to be a global variable");
/* Check that the variable can be safely declared as a concept.