From ba1ae78450677a0b2eac7c29a0bce0d2d369e9eb Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 14 Dec 2007 18:08:18 +0000 Subject: [PATCH] Do not warn about no prior declaration for non-global variables, enum entries and static thread local variables. [r18751] --- parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index f76817c..6acf52b 100644 --- a/parser.c +++ b/parser.c @@ -2351,8 +2351,11 @@ warn_redundant_declaration: warningf(declaration->source_position, "no previous declaration for '%#T'", type, symbol); } } else if (warning.missing_declarations && + context == global_context && declaration->storage_class != STORAGE_CLASS_STATIC && - declaration->storage_class != STORAGE_CLASS_TYPEDEF) { + declaration->storage_class != STORAGE_CLASS_TYPEDEF && + declaration->storage_class != STORAGE_CLASS_ENUM_ENTRY && + declaration->storage_class != STORAGE_CLASS_THREAD_STATIC) { warningf(declaration->source_position, "no previous declaration for '%#T'", type, symbol); } -- 2.20.1