mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
Submitted by: Bill Wendling
- Added C99 reference to why "auto" and "register" cannot be used as a storage class specifier for file scoped variable declarations. llvm-svn: 39557
This commit is contained in:
@@ -331,7 +331,8 @@ Sema::ParseDeclarator(Scope *S, Declarator &D, ExprTy *Init,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
// FIXME: Find C99 spec reference
|
||||
// C99 6.9p2: The storage-class specifiers auto and register shall not
|
||||
// appear in the declaration specifiers in an external declaration.
|
||||
if (SC == VarDecl::Auto || SC == VarDecl::Register) {
|
||||
Diag(D.getIdentifierLoc(), diag::err_typecheck_sclass_fscope,
|
||||
R.getAsString());
|
||||
|
||||
Reference in New Issue
Block a user