[cfe-commits] r39642 - in /cfe/cfe/trunk: Sema/SemaDecl.cpp include/clang/Basic/DiagnosticKinds.def
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:46:34 PDT 2007
Author: clattner
Date: Wed Jul 11 11:46:33 2007
New Revision: 39642
URL: http://llvm.org/viewvc/llvm-project?rev=39642&view=rev
Log:
GCC accepts code like this as an extension:
static int seminal(from, to)
{
}
Modified:
cfe/cfe/trunk/Sema/SemaDecl.cpp
cfe/cfe/trunk/include/clang/Basic/DiagnosticKinds.def
Modified: cfe/cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaDecl.cpp?rev=39642&r1=39641&r2=39642&view=diff
==============================================================================
--- cfe/cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaDecl.cpp Wed Jul 11 11:46:33 2007
@@ -475,7 +475,7 @@
if (!FTI.hasPrototype) {
for (unsigned i = 0, e = FTI.NumArgs; i != e; ++i) {
if (FTI.ArgInfo[i].TypeInfo == 0) {
- Diag(FTI.ArgInfo[i].IdentLoc, diag::err_param_not_declared,
+ Diag(FTI.ArgInfo[i].IdentLoc, diag::ext_param_not_declared,
FTI.ArgInfo[i].Ident->getName());
// Implicitly declare the argument as type 'int' for lack of a better
// type.
Modified: cfe/cfe/trunk/include/clang/Basic/DiagnosticKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Basic/DiagnosticKinds.def?rev=39642&r1=39641&r2=39642&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Basic/DiagnosticKinds.def (original)
+++ cfe/cfe/trunk/include/clang/Basic/DiagnosticKinds.def Wed Jul 11 11:46:33 2007
@@ -443,8 +443,8 @@
"declaration does not declare a parameter")
DIAG(err_no_matching_param, ERROR,
"parameter named '%0' is missing")
-DIAG(err_param_not_declared, ERROR,
- "parameter '%0' was not declared")
+DIAG(ext_param_not_declared, EXTENSION,
+ "parameter '%0' was not declared, defaulting to type 'int'")
DIAG(err_previous_definition, ERROR,
"previous definition is here")
More information about the cfe-commits
mailing list