From a3d81725122504594828f8766c0767c0e66a9b05 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 26 Aug 2014 21:51:57 +0000 Subject: [PATCH] Clarify comment so this doesn't appear to be a C11-only rule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216490 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 0079c4925a..e5cf31a9b3 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3450,6 +3450,9 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, // C11 6.7.2.1p2: // A struct-declaration that does not declare an anonymous structure or // anonymous union shall contain a struct-declarator-list. + // + // This rule also existed in C89 and C99; the grammar for struct-declaration + // did not permit a struct-declaration without a struct-declarator-list. if (!getLangOpts().CPlusPlus && CurContext->isRecord() && DS.getStorageClassSpec() == DeclSpec::SCS_unspecified) { // Check for Microsoft C extension: anonymous struct/union member. -- 2.50.1