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:
parent
abe64d9ec4
commit
d8f29cc021
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user