/cp
2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokvardecl): Complete check added for c++/67065.
/testsuite
2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/other/pr67065.C: Extend.
From-SVN: r227061
+2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (grokvardecl): Complete check added for c++/67065.
+
2015-08-20 Jason Merrill <jason@redhat.com>
* name-lookup.c (hidden_name_p): Handle OVERLOAD.
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 ())
error ("cannot declare %<::main%> to be a global variable");
/* Check that the variable can be safely declared as a concept.
+2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/other/pr67065.C: Extend.
+
2015-08-21 Nathan Sidwell <nathan@acm.org>
* lib/target-supports.exp (check_effective_target_freestanding): nvptx
// PR c++/67065
int main; // { dg-error "cannot declare" }
+
+void foo() { int main; }