FreeBSD/contrib/gcc/cp/parser.c
/* Check for repeated decl-specifiers.  */
Check for repeated decl-specifiers.
Check for repeated decl - specifiers .
static void
cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs)
{
  cp_decl_spec ds;
  for (ds = ds_first; ds != ds_last; ++ds)
    {
      unsigned count = decl_specs->specs[(int)ds];
      if (count < 2)
	continue;
      if (ds == ds_long)
	{
	  if (count > 2)
	    error ("%<long long long%> is too long for GCC");
	  else if (pedantic && !in_system_header && warn_long_long)
	    pedwarn ("ISO C++ does not support %<long long%>");
	}
      else if (count > 1)
	{
	  static const char *const decl_spec_names[] = {
	    "signed",
	    "unsigned",
	    "short",
	    "long",
	    "const",
	    "volatile",
	    "restrict",
	    "inline",
	    "virtual",
	    "explicit",
	    "friend",
	    "typedef",
	    "__complex",
	    "__thread"
	  };
	  error ("duplicate %qs", decl_spec_names[(int)ds]);
	}
    }
}
static void cp_parser_check_decl_spec ( cp_decl_specifier_seq * decl_specs ) { cp_decl_spec ds ; for ( ds = ds_first ; ds != ds_last ; ++ ds ) { unsigned count = decl_specs -> specs [ ( int ) ds ] ; if ( count < 2 ) continue ; if ( ds == ds_long ) { if ( count > 2 ) error ( " " ) ; else if ( pedantic && ! in_system_header && warn_long_long ) pedwarn ( " " ) ; } else if ( count > 1 ) { static const char * const decl_spec_names [ ] = { " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " } ; error ( " " , decl_spec_names [ ( int ) ds ] ) ; } } }
Check for repeated decl-specifiers.
Check for repeated decl - specifiers .
/* The "long" specifier is a special case because of "long long".  */