Commit d8f29cc0 by Paolo Carlini Committed by Paolo Carlini

decl.c (grokvardecl): Simplify the latter.

2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokvardecl): Simplify the latter.

From-SVN: r227078
parent abe64d9e
2015-08-21 Paolo Carlini <paolo.carlini@oracle.com> 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. * decl.c (grokvardecl): Complete check added for c++/67065.
2015-08-20 Jason Merrill <jason@redhat.com> 2015-08-20 Jason Merrill <jason@redhat.com>
......
...@@ -8357,8 +8357,7 @@ grokvardecl (tree type, ...@@ -8357,8 +8357,7 @@ grokvardecl (tree type,
if (DECL_NAME (decl) if (DECL_NAME (decl)
&& MAIN_NAME_P (DECL_NAME (decl)) && MAIN_NAME_P (DECL_NAME (decl))
&& CP_DECL_CONTEXT (decl) == global_namespace && scope == global_namespace)
&& !at_function_scope_p ())
error ("cannot declare %<::main%> to be a global variable"); error ("cannot declare %<::main%> to be a global variable");
/* Check that the variable can be safely declared as a concept. /* Check that the variable can be safely declared as a concept.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment