Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index ba46414..397c27d 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -400,6 +400,10 @@
break;
}
+ if (LangStd == lang_c89 || LangStd == lang_c94 || LangStd == lang_gnu89)
+ Options.ImplicitInt = 1;
+ else
+ Options.ImplicitInt = 0;
Options.Trigraphs = 1; // -trigraphs or -ansi
Options.DollarIdents = 1; // FIXME: Really a target property.
Options.PascalStrings = PascalStrings;