[cfe-commits] r39635 - /cfe/cfe/trunk/Parse/ParseDecl.cpp
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:46:29 PDT 2007
Author: clattner
Date: Wed Jul 11 11:46:29 2007
New Revision: 39635
URL: http://llvm.org/viewvc/llvm-project?rev=39635&view=rev
Log:
accept __extension__, update todo list.
Modified:
cfe/cfe/trunk/Parse/ParseDecl.cpp
Modified: cfe/cfe/trunk/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Parse/ParseDecl.cpp?rev=39635&r1=39634&r2=39635&view=diff
==============================================================================
--- cfe/cfe/trunk/Parse/ParseDecl.cpp (original)
+++ cfe/cfe/trunk/Parse/ParseDecl.cpp Wed Jul 11 11:46:29 2007
@@ -597,15 +597,15 @@
/// struct-contents:
/// struct-declaration-list
/// [EXT] empty
-/// [GNU] "struct-declaration-list" without terminatoring ';' [TODO]
+/// [GNU] "struct-declaration-list" without terminatoring ';'
/// struct-declaration-list:
/// struct-declaration
/// struct-declaration-list struct-declaration
/// [OBC] '@' 'defs' '(' class-name ')' [TODO]
/// struct-declaration:
/// specifier-qualifier-list struct-declarator-list ';'
-/// [GNU] __extension__ struct-declaration [TODO]
-/// [GNU] specifier-qualifier-list ';' [TODO]
+/// [GNU] __extension__ struct-declaration
+/// [GNU] specifier-qualifier-list ';'
/// struct-declarator-list:
/// struct-declarator
/// struct-declarator-list ',' struct-declarator
@@ -633,11 +633,16 @@
Tok.getKind() != tok::eof) {
// Each iteration of this loop reads one struct-declaration.
+ // Check for extraneous top-level semicolon.
if (Tok.getKind() == tok::semi) {
Diag(Tok, diag::ext_extra_struct_semi);
ConsumeToken();
continue;
}
+
+ // FIXME: When __extension__ is specified, disable extension diagnostics.
+ if (Tok.getKind() == tok::kw___extension__)
+ ConsumeToken();
// Parse the common specifier-qualifiers-list piece.
DeclSpec DS;
More information about the cfe-commits
mailing list