warn_bounded = 1;
static struct binding_level * make_binding_level	PROTO((void));static void clear_limbo_values		PROTO((tree));static int duplicate_decls		PROTO((tree, tree, int));static int redeclaration_error_message	PROTO((tree, tree));static void storedecls			PROTO((tree));static void storetags			PROTO((tree));static tree lookup_tag			PROTO((enum tree_code, tree,					       struct binding_level *, int));static tree lookup_tag_reverse		PROTO((tree));static tree grokdeclarator		PROTO((tree, tree, enum decl_context,					       int));static tree grokparms			PROTO((tree, int));static int field_decl_cmp		PROTO((const GENERIC_PTR, const GENERIC_PTR));static void layout_array_type		PROTO((tree));/* C-specific option variables.  *//* Nonzero means allow type mismatches in conditional expressions;   just make their values `void'.   */int flag_cond_mismatch;/* Nonzero means give `double' the same size as `float'.  */int flag_short_double;/* Nonzero means don't recognize the keyword `asm'.  */int flag_no_asm;/* Nonzero means don't recognize any builtin functions.  */int flag_no_builtin;/* Nonzero means don't recognize the non-ANSI builtin functions.   -ansi sets this.  */int flag_no_nonansi_builtin;/* Nonzero means do some things the same way PCC does.  */int flag_traditional;/* Nonzero means use the ISO C9x dialect of C.  */int flag_isoc9x = 0;/* Nonzero means that we have builtin functions, and main is an int */int flag_hosted = 1;/* Nonzero means to allow single precision math even if we're generally   being traditional.  */int flag_allow_single_precision = 0;/* Nonzero means to treat bitfields as signed unless they say `unsigned'.  */int flag_signed_bitfields = 1;int explicit_flag_signed_bitfields = 0;/* Nonzero means warn about use of implicit int. */int warn_implicit_int;/* Nonzero means warn about usage of long long when `-pedantic'.  */int warn_long_long = 1;/* Nonzero means message about use of implicit function declarations; 1 means warning; 2 means error. */int mesg_implicit_function_declaration;/* Nonzero means give string constants the type `const char *'   to get extra warnings from them.  These warnings will be too numerous   to be useful, except in thoroughly ANSIfied programs.  */int flag_const_strings;/* Nonzero means warn about pointer casts that can drop a type qualifier   from the pointer target type.  */int warn_cast_qual;/* Nonzero means warn when casting a function call to a type that does   not match the return type (e.g. (float)sqrt() or (anything*)malloc()   when there is no previous declaration of sqrt or malloc.  */int warn_bad_function_cast;/* Warn about functions which might be candidates for attribute noreturn. */int warn_missing_noreturn;/* Warn about traditional constructs whose meanings changed in ANSI C.  */int warn_traditional;/* Nonzero means warn about sizeof(function) or addition/subtraction   of function pointers.  */int warn_pointer_arith;/* Nonzero means warn for non-prototype function decls   or non-prototyped defs without previous prototype.  */int warn_strict_prototypes;/* Nonzero means warn for any global function def   without separate previous prototype decl.  */int warn_missing_prototypes;/* Nonzero means warn for any global function def   without separate previous decl.  */int warn_missing_declarations;/* Nonzero means warn about multiple (redundant) decls for the same single   variable or function.  */int warn_redundant_decls = 0;/* Nonzero means warn about extern declarations of objects not at   file-scope level and about *all* declarations of functions (whether   extern or static) not at file-scope level.  Note that we exclude   implicit function declarations.  To get warnings about those, use   -Wimplicit.  */int warn_nested_externs = 0;/* Warn about *printf or *scanf format/argument anomalies.  */int warn_format;/* Warn about a subscript that has type char.  */int warn_char_subscripts = 0;/* Warn if a type conversion is done that might have confusing results.  */int warn_conversion;/* Warn if adding () is suggested.  */int warn_parentheses;/* Warn if initializer is not completely bracketed.  */int warn_missing_braces;/* Warn if main is suspicious.  */int warn_main;/* Warn about #pragma directives that are not recognised.  */int warn_unknown_pragmas = 0; /* Tri state variable.  */  /* Warn about comparison of signed and unsigned values.   If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified.  */int warn_sign_compare = -1;/* Nonzero means warn about use of multicharacter literals.  */int warn_multichar = 1;/* Nonzero means `$' can be in an identifier.  */#ifndef DOLLARS_IN_IDENTIFIERS#define DOLLARS_IN_IDENTIFIERS 1#endifint dollars_in_ident = DOLLARS_IN_IDENTIFIERS;/* Linked list of disabled built-in functions.  */typedef struct disabled_builtin{  const char *name;  struct disabled_builtin *next;} disabled_builtin;static disabled_builtin *disabled_builtins = NULL;static int builtin_function_disabled_p PROTO ((const char *));void disable_builtin_function PROTO ((const char *));/* Decode the string P as a language-specific option for C.   Return the number of strings consumed.  */   intc_decode_option (argc, argv)     int argc ATTRIBUTE_UNUSED;     char **argv;{  int strings_processed;  char *p = argv[0];#if USE_CPPLIB  strings_processed = cpp_handle_option (&parse_in, argc, argv);#else  strings_processed = 0;#endif /* ! USE_CPPLIB */  if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))    {      flag_traditional = 1;      flag_writable_strings = 1;    }  else if (!strcmp (p, "-fallow-single-precision"))    flag_allow_single_precision = 1;  else if (!strcmp (p, "-fhosted") || !strcmp (p, "-fno-freestanding"))    {      flag_hosted = 1;      flag_no_builtin = 0;    }  else if (!strcmp (p, "-ffreestanding") || !strcmp (p, "-fno-hosted"))    {      flag_hosted = 0;      flag_no_builtin = 1;      /* warn_main will be 2 if set by -Wall, 1 if set by -Wmain */      if (warn_main == 2)	warn_main = 0;    }  else if (!strcmp (p, "-fnotraditional") || !strcmp (p, "-fno-traditional"))    {      flag_traditional = 0;      flag_writable_strings = 0;    }  else if (!strncmp (p, "-std=", 5))    {      /* Select the appropriate language standard.  We currently	 recognize:	 -std=iso9899:1990	same as -ansi	 -std=iso9899:199409	ISO C as modified in amend. 1	 -std=iso9899:199x	ISO C 9x	 -std=c89		same as -std=iso9899:1990	 -std=c9x		same as -std=iso9899:199x	 -std=gnu89		default, iso9899:1990 + gnu extensions	 -std=gnu9x		iso9899:199x + gnu extensions      */      const char *argstart = &p[5];      if (!strcmp (argstart, "iso9899:1990")	  || !strcmp (argstart, "c89"))	{	iso_1990:	  flag_traditional = 0;	  flag_writable_strings = 0;	  flag_no_asm = 1;	  flag_no_nonansi_builtin = 1;	  flag_isoc9x = 0;	}      else if (!strcmp (argstart, "iso9899:199409"))	{	  /* ??? The changes since ISO C 1990 are not supported.  */	  goto iso_1990;	}      else if (!strcmp (argstart, "iso9899:199x")	       || !strcmp (argstart, "c9x"))	{	  flag_traditional = 0;	  flag_writable_strings = 0;	  flag_no_asm = 1;	  flag_no_nonansi_builtin = 1;	  flag_isoc9x = 1;	}      else if (!strcmp (argstart, "gnu89"))	{	  flag_traditional = 0;	  flag_writable_strings = 0;	  flag_no_asm = 0;	  flag_no_nonansi_builtin = 0;	  flag_isoc9x = 0;	}      else if (!strcmp (argstart, "gnu9x"))	{	  flag_traditional = 0;	  flag_writable_strings = 0;	  flag_no_asm = 0;	  flag_no_nonansi_builtin = 0;	  flag_isoc9x = 1;	}      else	error ("unknown C standard `%s'", argstart);    }  else if (!strcmp (p, "-fdollars-in-identifiers"))    dollars_in_ident = 1;  else if (!strcmp (p, "-fno-dollars-in-identifiers"))    dollars_in_ident = 0;  else if (!strcmp (p, "-fsigned-char"))    flag_signed_char = 1;  else if (!strcmp (p, "-funsigned-char"))    flag_signed_char = 0;  else if (!strcmp (p, "-fno-signed-char"))    flag_signed_char = 0;  else if (!strcmp (p, "-fno-unsigned-char"))    flag_signed_char = 1;  else if (!strcmp (p, "-fsigned-bitfields")	   || !strcmp (p, "-fno-unsigned-bitfields"))    {      flag_signed_bitfields = 1;      explicit_flag_signed_bitfields = 1;    }  else if (!strcmp (p, "-funsigned-bitfields")	   || !strcmp (p, "-fno-signed-bitfields"))    {      flag_signed_bitfields = 0;      explicit_flag_signed_bitfields = 1;    }  else if (!strcmp (p, "-fshort-enums"))    flag_short_enums = 1;  else if (!strcmp (p, "-fno-short-enums"))    flag_short_enums = 0;  else if (!strcmp (p, "-fcond-mismatch"))    flag_cond_mismatch = 1;  else if (!strcmp (p, "-fno-cond-mismatch"))    flag_cond_mismatch = 0;  else if (!strcmp (p, "-fshort-double"))    flag_short_double = 1;  else if (!strcmp (p, "-fno-short-double"))    flag_short_double = 0;  else if (!strcmp (p, "-fasm"))    flag_no_asm = 0;  else if (!strcmp (p, "-fno-asm"))    flag_no_asm = 1;  else if (!strcmp (p, "-fbuiltin"))    flag_no_builtin = 0;  else if (!strcmp (p, "-fno-builtin"))    flag_no_builtin = 1;  else if (!strncmp (p, "-fno-builtin-", strlen ("-fno-builtin-")))    disable_builtin_function (p + strlen ("-fno-builtin-"));  else if (!strcmp (p, "-ansi"))    goto iso_1990;  else if (!strcmp (p, "-Werror-implicit-function-declaration"))    mesg_implicit_function_declaration = 2;  else if (!strcmp (p, "-Wimplicit-function-declaration"))    mesg_implicit_function_declaration = 1;  else if (!strcmp (p, "-Wno-implicit-function-declaration"))    mesg_implicit_function_declaration = 0;  else if (!strcmp (p, "-Wimplicit-int"))    warn_implicit_int = 1;  else if (!strcmp (p, "-Wno-implicit-int"))    warn_implicit_int = 0;  else if (!strcmp (p, "-Wimplicit"))    {      warn_implicit_int = 1;      if (mesg_implicit_function_declaration != 2)        mesg_implicit_function_declaration = 1;    }  else if (!strcmp (p, "-Wno-implicit"))    warn_implicit_int = 0, mesg_implicit_function_declaration = 0;  else if (!strcmp (p, "-Wlong-long"))    warn_long_long = 1;  else if (!strcmp (p, "-Wno-long-long"))    warn_long_long = 0;  else if (!strcmp (p, "-Wwrite-strings"))    flag_const_strings = 1;  else if (!strcmp (p, "-Wno-write-strings"))    flag_const_strings = 0;  else if (!strcmp (p, "-Wcast-qual"))    warn_cast_qual = 1;  else if (!strcmp (p, "-Wno-cast-qual"))    warn_cast_qual = 0;  else if (!strcmp (p, "-Wbad-function-cast"))    warn_bad_function_cast = 1;  else if (!strcmp (p, "-Wno-bad-function-cast"))    warn_bad_function_cast = 0;  else if (!strcmp (p, "-Wmissing-noreturn"))    warn_missing_noreturn = 1;  else if (!strcmp (p, "-Wno-missing-noreturn"))    warn_missing_noreturn = 0;  else if (!strcmp (p, "-Wpointer-arith"))    warn_pointer_arith = 1;  else if (!strcmp (p, "-Wno-pointer-arith"))    warn_pointer_arith = 0;  else if (!strcmp (p, "-Wstrict-prototypes"))    warn_strict_prototypes = 1;  else if (!strcmp (p, "-Wno-strict-prototypes"))    warn_strict_prototypes = 0;  else if (!strcmp (p, "-Wmissing-prototypes"))    warn_missing_prototypes = 1;  else if (!strcmp (p, "-Wno-missing-prototypes"))    warn_missing_prototypes = 0;  else if (!strcmp (p, "-Wmissing-declarations"))    warn_missing_declarations = 1;  else if (!strcmp (p, "-Wno-missing-declarations"))    warn_missing_declarations = 0;  else if (!strcmp (p, "-Wredundant-decls"))    warn_redundant_decls = 1;  else if (!strcmp (p, "-Wno-redundant-decls"))    warn_redundant_decls = 0;  else if (!strcmp (p, "-Wnested-externs"))    warn_nested_externs = 1;  else if (!strcmp (p, "-Wno-nested-externs"))    warn_nested_externs = 0;  else if (!strcmp (p, "-Wtraditional"))    warn_traditional = 1;  else if (!strcmp (p, "-Wno-traditional"))    warn_traditional = 0;  else if (!strcmp (p, "-Wformat"))    warn_format = 1;  else if (!strcmp (p, "-Wno-format"))    warn_format = 0;  else if (!strcmp (p, "-Wchar-subscripts"))    warn_char_subscripts = 1;  else if (!strcmp (p, "-Wno-char-subscripts"))    warn_char_subscripts = 0;  else if (!strcmp (p, "-Wconversion"))    warn_conversion = 1;  else if (!strcmp (p, "-Wno-conversion"))    warn_conversion = 0;  else if (!strcmp (p, "-Wparentheses"))    warn_parentheses = 1;  else if (!strcmp (p, "-Wno-parentheses"))    warn_parentheses = 0;  else if (!strcmp (p, "-Wreturn-type"))    warn_return_type = 1;  else if (!strcmp (p, "-Wno-return-type"))    warn_return_type = 0;  else if (!strcmp (p, "-Wcomment"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wno-comment"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wcomments"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wno-comments"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wtrigraphs"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wno-trigraphs"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wundef"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wno-undef"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wimport"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wno-import"))    ; /* cpp handles this one.  */  else if (!strcmp (p, "-Wmissing-braces"))    warn_missing_braces = 1;  else if (!strcmp (p, "-Wno-missing-braces"))    warn_missing_braces = 0;  else if (!strcmp (p, "-Wmain"))    warn_main = 1;  else if (!strcmp (p, "-Wno-main"))    warn_main = -1;  else if (!strcmp (p, "-Wsign-compare"))    warn_sign_compare = 1;  else if (!strcmp (p, "-Wno-sign-compare"))    warn_sign_compare = 0;  else if (!strcmp (p, "-Wmultichar"))    warn_multichar = 1;  else if (!strcmp (p, "-Wno-multichar"))    warn_multichar = 0;  else if (!strcmp (p, "-Wunknown-pragmas"))    /* Set to greater than 1, so that even unknown pragmas in system       headers will be warned about.  */    warn_unknown_pragmas = 2;  else if (!strcmp (p, "-Wno-unknown-pragmas"))    warn_unknown_pragmas = 0;  else if (!strcmp (p, "-Wall"))    {      /* We save the value of warn_uninitialized, since if they put	 -Wuninitialized on the command line, we need to generate a	 warning about not using it without also specifying -O.  */      if (warn_uninitialized != 1)	warn_uninitialized = 2;      warn_implicit_int = 1;      mesg_implicit_function_declaration = 1;      warn_return_type = 1;      warn_unused = 1;      warn_switch = 1;      warn_format = 1;      warn_char_subscripts = 1;      warn_parentheses = 1;      warn_missing_braces = 1;      /* We set this to 2 here, but 1 in -Wmain, so -ffreestanding can turn	 it off only if it's not explicit.  */      warn_main = 2;      /* Only warn about unknown pragmas that are not in system headers.  */      warn_unknown_pragmas = 1;    }  else    return strings_processed;  return 1;}/* Hooks for print_node.  */voidprint_lang_decl (file, node, indent)     FILE *file ATTRIBUTE_UNUSED;     tree node ATTRIBUTE_UNUSED;     int indent ATTRIBUTE_UNUSED;{}voidprint_lang_type (file, node, indent)     FILE *file ATTRIBUTE_UNUSED;     tree node ATTRIBUTE_UNUSED;     int indent ATTRIBUTE_UNUSED;{}voidprint_lang_identifier (file, node, indent)     FILE *file;     tree node;     int indent;{  print_node (file, "global", IDENTIFIER_GLOBAL_VALUE (node), indent + 4);  print_node (file, "local", IDENTIFIER_LOCAL_VALUE (node), indent + 4);  print_node (file, "label", IDENTIFIER_LABEL_VALUE (node), indent + 4);  print_node (file, "implicit", IDENTIFIER_IMPLICIT_DECL (node), indent + 4);  print_node (file, "error locus", IDENTIFIER_ERROR_LOCUS (node), indent + 4);  print_node (file, "limbo value", IDENTIFIER_LIMBO_VALUE (node), indent + 4);}/* Hook called at end of compilation to assume 1 elt   for a top-level array decl that wasn't complete before.  */   voidfinish_incomplete_decl (decl)     tree decl;{  if (TREE_CODE (decl) == VAR_DECL)    {      tree type = TREE_TYPE (decl);      if (type != error_mark_node	  && TREE_CODE (type) == ARRAY_TYPE	  && TYPE_DOMAIN (type) == 0)	{	  if (! DECL_EXTERNAL (decl))	    warning_with_decl (decl, "array `%s' assumed to have one element");	  complete_array_type (type, NULL_TREE, 1);	  layout_decl (decl, 0);	}    }}/* Create a new `struct binding_level'.  */staticstruct binding_level *make_binding_level (){  /* NOSTRICT */  return (struct binding_level *) xmalloc (sizeof (struct binding_level));}