[cfe-commits] r39557 - /cfe/cfe/trunk/Sema/SemaDecl.cpp

bwendlin at cs.uiuc.edu bwendlin at cs.uiuc.edu
Wed Jul 11 09:45:34 PDT 2007


Author: bwendlin
Date: Wed Jul 11 11:45:34 2007
New Revision: 39557

URL: http://llvm.org/viewvc/llvm-project?rev=39557&view=rev
Log:
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.

Modified:
    cfe/cfe/trunk/Sema/SemaDecl.cpp

Modified: cfe/cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaDecl.cpp?rev=39557&r1=39556&r2=39557&view=diff

==============================================================================
--- cfe/cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaDecl.cpp Wed Jul 11 11:45:34 2007
@@ -331,7 +331,8 @@
           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());





More information about the cfe-commits mailing list