decl.c (grokvardecl): Simplify the latter.

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

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

From-SVN: r227078
This commit is contained in:
Paolo Carlini 2015-08-21 17:39:48 +00:00 committed by Paolo Carlini
parent abe64d9ec4
commit d8f29cc021
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,7 @@
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.

View File

@ -8357,8 +8357,7 @@ grokvardecl (tree type,
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.