diff options
-rw-r--r-- | Sema/SemaType.cpp | 1 | ||||
-rw-r--r-- | test/Sema/implicit-int.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Sema/SemaType.cpp b/Sema/SemaType.cpp index cdb767f58c..388359a753 100644 --- a/Sema/SemaType.cpp +++ b/Sema/SemaType.cpp @@ -37,6 +37,7 @@ static QualType ConvertDeclSpecToType(const DeclSpec &DS, ASTContext &Ctx) { "Unknown TSS value"); return Ctx.UnsignedCharTy; } + case DeclSpec::TST_unspecified: // Unspecific typespec defaults to int. case DeclSpec::TST_int: if (DS.getTypeSpecSign() != DeclSpec::TSS_unsigned) { switch (DS.getTypeSpecWidth()) { diff --git a/test/Sema/implicit-int.c b/test/Sema/implicit-int.c new file mode 100644 index 0000000000..e4a215fb78 --- /dev/null +++ b/test/Sema/implicit-int.c @@ -0,0 +1,4 @@ +// RUN: clang -fsyntax-only %s + +foo() { +} |