From 4078b403a7dc806f4521f3600b524bed55309515 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 1 Aug 2002 06:20:46 +0000 Subject: c-common.c: Define all C/ObjC/C++ warning and flag variables. * c-common.c: Define all C/ObjC/C++ warning and flag variables. * c-common.h: Declare all C/ObjC/C++ warning and flag variables. * c-decl.c: Move all warning and flag variables to c-common.c. * c-format.c: Move all warning variables to c-common.c. * c-tree.h: Move all warning and flag declarations to c-common.h. * objc/objc-act.c: Move all warning variables to c-common.c. (flag_warn_protocol): Rename warn_protocol. cp: * cp-tree.h: Move all warning and flag declarations to c-common.h. * decl.c: Move all warning and flag variables to c-common.c. * decl2.c: Move all warning and flag variables to c-common.c. * lex.c (flag_digraphs): Remove. (warn_traditional): Now in c-common.c. From-SVN: r55923 --- gcc/objc/objc-act.c | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'gcc/objc') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 42944a8..2ea47bc 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -324,8 +324,6 @@ static void generate_struct_by_value_array PARAMS ((void)) #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" -static const char *constant_string_class_name = NULL; - static const char *TAG_GETCLASS; static const char *TAG_GETMETACLASS; static const char *TAG_MSGSEND; @@ -356,33 +354,10 @@ extern enum debug_info_type write_symbols; extern const char *dump_base_name; -/* Generate code for GNU or NeXT runtime environment. */ - -#ifdef NEXT_OBJC_RUNTIME -int flag_next_runtime = 1; -#else -int flag_next_runtime = 0; -#endif - -int flag_typed_selectors; - -/* Open and close the file for outputting class declarations, if requested. */ - -int flag_gen_declaration = 0; +static int flag_typed_selectors; FILE *gen_declaration_file; -/* Warn if multiple methods are seen for the same selector, but with - different argument types. */ - -int warn_selector = 0; - -/* Warn if methods required by a protocol are not implemented in the - class adopting it. When turned off, methods inherited to that - class are also considered implemented */ - -int flag_warn_protocol = 1; - /* Tells "encode_pointer/encode_aggregate" whether we are generating type descriptors for instance variables (as opposed to methods). Type descriptors for instance variables contain more information @@ -390,12 +365,6 @@ int flag_warn_protocol = 1; static int generating_instance_variables = 0; -/* Tells the compiler that this is a special run. Do not perform any - compiling, instead we are to test some platform dependent features - and output a C header file with appropriate definitions. */ - -static int print_struct_values = 0; - /* Some platforms pass small structures through registers versus through an invisible pointer. Determine at what size structure is the transition point between the two possibilities. */ @@ -540,9 +509,9 @@ objc_decode_option (argc, argv) else if (!strcmp (p, "-Wno-selector")) warn_selector = 0; else if (!strcmp (p, "-Wprotocol")) - flag_warn_protocol = 1; + warn_protocol = 1; else if (!strcmp (p, "-Wno-protocol")) - flag_warn_protocol = 0; + warn_protocol = 0; else if (!strcmp (p, "-fgnu-runtime")) flag_next_runtime = 0; else if (!strcmp (p, "-fno-next-runtime")) @@ -5878,7 +5847,7 @@ check_protocol (p, type, name) int f1, f2; /* Ensure that all protocols have bodies! */ - if (flag_warn_protocol) + if (warn_protocol) { f1 = check_methods (PROTOCOL_CLS_METHODS (p), CLASS_CLS_METHODS (objc_implementation_context), -- cgit v1.1