Commit 3f75a254 by Joseph Myers Committed by Joseph Myers

c-aux-info.c, [...]: Follow code formatting conventions.

	* c-aux-info.c, c-common.c, c-common.h, c-cppbuiltin.c, c-decl.c,
	c-format.c, c-incpath.c, c-lex.c, c-objc-common.c, c-opts.c,
	c-parse.in, c-pch.c, c-ppoutput.c, c-pragma.c, c-typeck.c: Follow
	code formatting conventions.

From-SVN: r88462
parent 57c1f13e
2004-10-03 Joseph S. Myers <jsm@polyomino.org.uk>
* c-aux-info.c, c-common.c, c-common.h, c-cppbuiltin.c, c-decl.c,
c-format.c, c-incpath.c, c-lex.c, c-objc-common.c, c-opts.c,
c-parse.in, c-pch.c, c-ppoutput.c, c-pragma.c, c-typeck.c: Follow
code formatting conventions.
2004-10-03 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.md (<u>mulsidi3_32bit_r4000): Fix unsigned case.
......
......@@ -559,7 +559,7 @@ gen_aux_info_record (tree fndecl, int is_definition, int is_implicit,
/* Each output .X file must have a header line. Write one now if we
have not yet done so. */
if (! compiled_from_record++)
if (!compiled_from_record++)
{
/* The first line tells which directory file names are relative to.
Currently, -aux-info works only for files in the working
......
......@@ -113,16 +113,16 @@ enum rid
};
#define OBJC_IS_AT_KEYWORD(rid) \
((unsigned int)(rid) >= (unsigned int)RID_FIRST_AT && \
(unsigned int)(rid) <= (unsigned int)RID_LAST_AT)
((unsigned int) (rid) >= (unsigned int) RID_FIRST_AT && \
(unsigned int) (rid) <= (unsigned int) RID_LAST_AT)
#define OBJC_IS_PQ_KEYWORD(rid) \
((unsigned int)(rid) >= (unsigned int)RID_FIRST_PQ && \
(unsigned int)(rid) <= (unsigned int)RID_LAST_PQ)
((unsigned int) (rid) >= (unsigned int) RID_FIRST_PQ && \
(unsigned int) (rid) <= (unsigned int) RID_LAST_PQ)
/* The elements of `ridpointers' are identifier nodes for the reserved
type names and storage classes. It is indexed by a RID_... value. */
extern GTY ((length ("(int)RID_MAX"))) tree *ridpointers;
extern GTY ((length ("(int) RID_MAX"))) tree *ridpointers;
/* Standard named or nameless data types of the C compiler. */
......
......@@ -259,7 +259,7 @@ define__GNUC__ (void)
([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? */
const char *q, *v = version_string;
while (*v && ! ISDIGIT (*v))
while (*v && !ISDIGIT (*v))
v++;
gcc_assert (*v && (v <= version_string || v[-1] == '-'));
......
......@@ -232,10 +232,10 @@ decode_format_attr (tree args, function_format_info *info, int validated_p)
or inheriting from, for the purpose of format features supported. */
#define CPLUSPLUS_STD_VER STD_C94
/* The C standard version we are checking formats against when pedantic. */
#define C_STD_VER ((int)(c_dialect_cxx () \
? CPLUSPLUS_STD_VER \
: (flag_isoc99 \
? STD_C99 \
#define C_STD_VER ((int) (c_dialect_cxx () \
? CPLUSPLUS_STD_VER \
: (flag_isoc99 \
? STD_C99 \
: (flag_isoc94 ? STD_C94 : STD_C89))))
/* The name to give to the standard version we are warning about when
pedantic. FEATURE_VER is the version in which the feature warned out
......@@ -247,7 +247,7 @@ decode_format_attr (tree args, function_format_info *info, int validated_p)
: "ISO C90"))
/* Adjust a C standard version, which may be STD_C9L, to account for
-Wno-long-long. Returns other standard versions unchanged. */
#define ADJ_STD(VER) ((int)((VER) == STD_C9L \
#define ADJ_STD(VER) ((int) ((VER) == STD_C9L \
? (warn_long_long ? STD_C99 : STD_C89) \
: (VER)))
......@@ -924,7 +924,7 @@ maybe_read_dollar_number (const char **format,
int argnum;
int overflow_flag;
const char *fcp = *format;
if (! ISDIGIT (*fcp))
if (!ISDIGIT (*fcp))
{
if (dollar_needed)
{
......@@ -1744,7 +1744,7 @@ check_format_info_main (format_check_results *res,
++fci;
if (fci->format_chars == 0)
{
if (ISGRAPH(format_char))
if (ISGRAPH (format_char))
warning ("unknown conversion type character %qc in format",
format_char);
else
......@@ -2150,7 +2150,7 @@ check_format_types (format_wanted_type *types, const char *format_start,
a second level of indirection. */
if (TREE_CODE (wanted_type) == INTEGER_TYPE
&& TREE_CODE (cur_type) == INTEGER_TYPE
&& (! pedantic || i == 0 || (i == 1 && char_type_flag))
&& (!pedantic || i == 0 || (i == 1 && char_type_flag))
&& (TYPE_UNSIGNED (wanted_type)
? wanted_type == c_common_unsigned_type (cur_type)
: wanted_type == c_common_signed_type (cur_type)))
......@@ -2158,7 +2158,7 @@ check_format_types (format_wanted_type *types, const char *format_start,
/* Likewise, "signed char", "unsigned char" and "char" are
equivalent but the above test won't consider them equivalent. */
if (wanted_type == char_type_node
&& (! pedantic || i < 2)
&& (!pedantic || i < 2)
&& char_type_flag)
continue;
/* Now we have a type mismatch. */
......@@ -2350,7 +2350,7 @@ init_dynamic_diag_info (void)
/* Assign the new data for use. */
/* All the GCC diag formats use the same length specs. */
if (! diag_ls)
if (!diag_ls)
dynamic_format_types[gcc_diag_format_type].length_char_specs =
dynamic_format_types[gcc_cdiag_format_type].length_char_specs =
dynamic_format_types[gcc_cxxdiag_format_type].length_char_specs =
......@@ -2371,12 +2371,12 @@ init_dynamic_diag_info (void)
}
/* Handle the __gcc_diag__ format specifics. */
if (! diag_fci)
if (!diag_fci)
dynamic_format_types[gcc_diag_format_type].conversion_specs =
diag_fci = (format_char_info *)
xmemdup (gcc_diag_char_table,
sizeof(gcc_diag_char_table),
sizeof(gcc_diag_char_table));
sizeof (gcc_diag_char_table),
sizeof (gcc_diag_char_table));
if (loc)
{
i = find_char_info_specifier_index (diag_fci, 'H');
......@@ -2391,12 +2391,12 @@ init_dynamic_diag_info (void)
}
/* Handle the __gcc_cdiag__ format specifics. */
if (! cdiag_fci)
if (!cdiag_fci)
dynamic_format_types[gcc_cdiag_format_type].conversion_specs =
cdiag_fci = (format_char_info *)
xmemdup (gcc_cdiag_char_table,
sizeof(gcc_cdiag_char_table),
sizeof(gcc_cdiag_char_table));
sizeof (gcc_cdiag_char_table),
sizeof (gcc_cdiag_char_table));
if (loc)
{
i = find_char_info_specifier_index (cdiag_fci, 'H');
......@@ -2415,12 +2415,12 @@ init_dynamic_diag_info (void)
}
/* Handle the __gcc_cxxdiag__ format specifics. */
if (! cxxdiag_fci)
if (!cxxdiag_fci)
dynamic_format_types[gcc_cxxdiag_format_type].conversion_specs =
cxxdiag_fci = (format_char_info *)
xmemdup (gcc_cxxdiag_char_table,
sizeof(gcc_cxxdiag_char_table),
sizeof(gcc_cxxdiag_char_table));
sizeof (gcc_cxxdiag_char_table),
sizeof (gcc_cxxdiag_char_table));
if (loc)
{
i = find_char_info_specifier_index (cxxdiag_fci, 'H');
......@@ -2527,15 +2527,15 @@ handle_format_attribute (tree *node, tree ARG_UNUSED (name), tree args,
/* If this is format __asm_fprintf__, we have to initialize
GCC's notion of HOST_WIDE_INT for checking %wd. */
if (info.format_type == asm_fprintf_format_type)
init_dynamic_asm_fprintf_info();
init_dynamic_asm_fprintf_info ();
/* If this is one of the diagnostic attributes, then we have to
initialize 'location_t' and 'tree' at runtime. */
else if (info.format_type == gcc_diag_format_type
|| info.format_type == gcc_cdiag_format_type
|| info.format_type == gcc_cxxdiag_format_type)
init_dynamic_diag_info();
init_dynamic_diag_info ();
else
gcc_unreachable();
gcc_unreachable ();
}
return NULL_TREE;
......
......@@ -37,7 +37,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define INO_T_EQ(A, B) (!memcmp (&(A), &(B), sizeof (A)))
# define INO_T_COPY(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof (SRC))
#else
# if (defined _WIN32 && ! defined (_UWIN)) || defined __MSDOS__
# if (defined _WIN32 && !defined (_UWIN)) || defined __MSDOS__
# define INO_T_EQ(A, B) 0
# else
# define INO_T_EQ(A, B) ((A) == (B))
......
......@@ -121,9 +121,9 @@ get_fileinfo (const char *name)
struct c_fileinfo *fi;
if (!file_info_tree)
file_info_tree = splay_tree_new ((splay_tree_compare_fn)strcmp,
file_info_tree = splay_tree_new ((splay_tree_compare_fn) strcmp,
0,
(splay_tree_delete_value_fn)free);
(splay_tree_delete_value_fn) free);
n = splay_tree_lookup (file_info_tree, (splay_tree_key) name);
if (n)
......@@ -172,7 +172,7 @@ dump_time_statistics (void)
print_time ("header files (total)", header_time);
print_time ("main file (total)", this_time - body_time);
fprintf (stderr, "ratio = %g : 1\n",
(double)header_time / (double)(this_time - body_time));
(double) header_time / (double) (this_time - body_time));
fprintf (stderr, "\n******\n");
splay_tree_foreach (file_info_tree, dump_one_header, 0);
......@@ -184,14 +184,14 @@ cb_ident (cpp_reader * ARG_UNUSED (pfile),
const cpp_string * ARG_UNUSED (str))
{
#ifdef ASM_OUTPUT_IDENT
if (! flag_no_ident)
if (!flag_no_ident)
{
/* Convert escapes in the string. */
cpp_string cstr = { 0, 0 };
if (cpp_interpret_string (pfile, str, 1, &cstr, false))
{
ASM_OUTPUT_IDENT (asm_out_file, (const char *) cstr.text);
free ((void *)cstr.text);
free ((void *) cstr.text);
}
}
#endif
......@@ -225,7 +225,7 @@ fe_file_change (const struct line_map *new_map)
{
/* Don't stack the main buffer on the input stack;
we already did in compile_file. */
if (! MAIN_FILE_P (new_map))
if (!MAIN_FILE_P (new_map))
{
#ifdef USE_MAPPED_LOCATION
int included_at = LAST_SOURCE_LINE_LOCATION (new_map - 1);
......@@ -437,7 +437,7 @@ c_lex_with_flags (tree *value, unsigned char *cpp_flags)
/* else fall through */
case CPP_PRAGMA:
*value = build_string (tok->val.str.len, (char *)tok->val.str.text);
*value = build_string (tok->val.str.len, (char *) tok->val.str.text);
break;
/* These tokens should not be visible outside cpplib. */
......@@ -451,7 +451,7 @@ c_lex_with_flags (tree *value, unsigned char *cpp_flags)
break;
}
if (! no_more_pch)
if (!no_more_pch)
{
no_more_pch = true;
c_common_no_more_pch ();
......@@ -490,8 +490,8 @@ narrowest_unsigned_type (unsigned HOST_WIDE_INT low,
{
tree upper = TYPE_MAX_VALUE (integer_types[itk]);
if ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) == high
if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
&& TREE_INT_CST_LOW (upper) >= low))
return itk;
}
......@@ -518,8 +518,8 @@ narrowest_signed_type (unsigned HOST_WIDE_INT low,
{
tree upper = TYPE_MAX_VALUE (integer_types[itk]);
if ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH (upper) == high
if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
&& TREE_INT_CST_LOW (upper) >= low))
return itk;
}
......@@ -592,7 +592,7 @@ interpret_integer (const cpp_token *token, unsigned int flags)
if (itk > itk_unsigned_long
&& (flags & CPP_N_WIDTH) != CPP_N_LARGE
&& ! in_system_header && ! flag_isoc99)
&& !in_system_header && !flag_isoc99)
pedwarn ("integer constant is too large for %qs type",
(flags & CPP_N_UNSIGNED) ? "unsigned long" : "long");
......@@ -741,8 +741,8 @@ lex_string (const cpp_token *tok, tree *valp, bool objc_string)
? cpp_interpret_string : cpp_interpret_string_notranslate)
(parse_in, strs, count, &istr, wide))
{
value = build_string (istr.len, (char *)istr.text);
free ((void *)istr.text);
value = build_string (istr.len, (char *) istr.text);
free ((void *) istr.text);
if (c_lex_string_translate == -1)
{
......@@ -752,17 +752,17 @@ lex_string (const cpp_token *tok, tree *valp, bool objc_string)
then the untranslated parsing will always succeed. */
gcc_assert (xlated);
if (TREE_STRING_LENGTH (value) != (int)istr.len
|| 0 != strncmp (TREE_STRING_POINTER (value), (char *)istr.text,
if (TREE_STRING_LENGTH (value) != (int) istr.len
|| 0 != strncmp (TREE_STRING_POINTER (value), (char *) istr.text,
istr.len))
{
/* Arrange for us to return the untranslated string in
*valp, but to set up the C type of the translated
one. */
*valp = build_string (istr.len, (char *)istr.text);
*valp = build_string (istr.len, (char *) istr.text);
valp = &TREE_CHAIN (*valp);
}
free ((void *)istr.text);
free ((void *) istr.text);
}
}
else
......
......@@ -93,7 +93,7 @@ c_cannot_inline_tree_fn (tree *fnp)
goto cannot_inline;
}
if (! function_attribute_inlinable_p (fn))
if (!function_attribute_inlinable_p (fn))
{
if (do_warning)
warning ("%Jfunction %qF can never be inlined because it uses "
......@@ -117,7 +117,7 @@ c_cannot_inline_tree_fn (tree *fnp)
}
}
if (! DECL_FILE_SCOPE_P (fn))
if (!DECL_FILE_SCOPE_P (fn))
{
/* If a nested function has pending sizes, we may have already
saved them. */
......
......@@ -1036,7 +1036,7 @@ c_common_post_options (const char **pfilename)
}
if (flag_working_directory
&& flag_preprocess_only && ! flag_no_line_commands)
&& flag_preprocess_only && !flag_no_line_commands)
pp_dir_change (parse_in, get_src_pwd ());
return flag_preprocess_only;
......@@ -1343,7 +1343,7 @@ push_command_line_include (void)
{
struct deferred_opt *opt = &deferred_opts[include_cursor++];
if (! cpp_opts->preprocessed && opt->code == OPT_include
if (!cpp_opts->preprocessed && opt->code == OPT_include
&& cpp_push_include (parse_in, opt->arg))
return;
}
......@@ -1354,7 +1354,7 @@ push_command_line_include (void)
/* -Wunused-macros should only warn about macros defined hereafter. */
cpp_opts->warn_unused_macros = warn_unused_macros;
/* Restore the line map from <command line>. */
if (! cpp_opts->preprocessed)
if (!cpp_opts->preprocessed)
cpp_change_file (parse_in, LC_RENAME, main_input_filename);
/* Set this here so the client can change the option if it wishes,
......@@ -1380,7 +1380,7 @@ cb_file_change (cpp_reader * ARG_UNUSED (pfile),
void
cb_dir_change (cpp_reader * ARG_UNUSED (pfile), const char *dir)
{
if (! set_src_pwd (dir))
if (!set_src_pwd (dir))
warning ("too late for # directive to set debug directory");
}
......
......@@ -386,7 +386,7 @@ extdefs:
save_obstack_position { $<dsptype>$ = NULL; } extdef
{ obstack_free (&parser_obstack, $1); }
| extdefs save_obstack_position
{ $<dsptype>$ = NULL; ggc_collect(); } extdef
{ $<dsptype>$ = NULL; ggc_collect (); } extdef
{ obstack_free (&parser_obstack, $2); }
;
......@@ -430,8 +430,8 @@ datadef:
fndef:
declspecs_ts setspecs declarator
{ if (! start_function (current_declspecs, $3,
all_prefix_attributes))
{ if (!start_function (current_declspecs, $3,
all_prefix_attributes))
YYERROR1;
}
old_style_parm_decls save_location
......@@ -443,8 +443,8 @@ fndef:
| declspecs_ts setspecs declarator error
{ POP_DECLSPEC_STACK; }
| declspecs_nots setspecs notype_declarator
{ if (! start_function (current_declspecs, $3,
all_prefix_attributes))
{ if (!start_function (current_declspecs, $3,
all_prefix_attributes))
YYERROR1;
}
old_style_parm_decls save_location
......@@ -456,8 +456,8 @@ fndef:
| declspecs_nots setspecs notype_declarator error
{ POP_DECLSPEC_STACK; }
| setspecs notype_declarator
{ if (! start_function (current_declspecs, $2,
all_prefix_attributes))
{ if (!start_function (current_declspecs, $2,
all_prefix_attributes))
YYERROR1;
}
old_style_parm_decls save_location
......@@ -690,7 +690,7 @@ primary:
finish_init ();
maybe_warn_string_init (type, init);
if (pedantic && ! flag_isoc99)
if (pedantic && !flag_isoc99)
pedwarn ("ISO C90 forbids compound literals");
$$.value = build_compound_literal (type, constructor);
$$.original_code = ERROR_MARK;
......@@ -1433,7 +1433,7 @@ initlist1:
It may use braces. */
initelt:
designator_list '=' initval
{ if (pedantic && ! flag_isoc99)
{ if (pedantic && !flag_isoc99)
pedwarn ("ISO C90 forbids specifying subobject to initialize"); }
| designator initval
{ if (pedantic)
......@@ -1479,8 +1479,8 @@ nested_function:
pedwarn ("ISO C forbids nested functions");
push_function_context ();
if (! start_function (current_declspecs, $1,
all_prefix_attributes))
if (!start_function (current_declspecs, $1,
all_prefix_attributes))
{
pop_function_context ();
YYERROR1;
......@@ -1509,8 +1509,8 @@ notype_nested_function:
pedwarn ("ISO C forbids nested functions");
push_function_context ();
if (! start_function (current_declspecs, $1,
all_prefix_attributes))
if (!start_function (current_declspecs, $1,
all_prefix_attributes))
{
pop_function_context ();
YYERROR1;
......@@ -1692,7 +1692,7 @@ maybecomma:
maybecomma_warn:
/* empty */
| ','
{ if (pedantic && ! flag_isoc99)
{ if (pedantic && !flag_isoc99)
pedwarn ("comma at end of enumerator list"); }
;
......@@ -2568,7 +2568,7 @@ identifiers_or_typenames:
extension:
EXTENSION
{ $$ = SAVE_EXT_FLAGS();
{ $$ = SAVE_EXT_FLAGS ();
pedantic = 0;
warn_pointer_arith = 0;
warn_traditional = 0;
......
......@@ -99,7 +99,7 @@ static const char *get_ident (void);
format. */
static const char *
get_ident(void)
get_ident (void)
{
static char result[IDENT_LENGTH];
static const char template[IDENT_LENGTH] = "gpch.012";
......@@ -122,7 +122,7 @@ pch_init (void)
void *target_validity;
static const char partial_pch[IDENT_LENGTH] = "gpcWrite";
if (! pch_file)
if (!pch_file)
return;
f = fopen (pch_file, "w+b");
......@@ -484,7 +484,7 @@ c_common_pch_pragma (cpp_reader *pfile)
return;
}
if (! cpp_get_options (pfile)->preprocessed)
if (!cpp_get_options (pfile)->preprocessed)
{
error ("pch_preprocess pragma should only be used with -fpreprocessed");
inform ("use #include instead");
......
......@@ -254,7 +254,7 @@ print_line (source_location src_loc, const char *special_flags)
/* cpp_quote_string does not nul-terminate, so we have to do it
ourselves. */
p = cpp_quote_string (to_file_quoted,
(unsigned char *)map->to_file, to_file_len);
(unsigned char *) map->to_file, to_file_len);
*p = '\0';
fprintf (print.outf, "# %u \"%s\"%s", print.src_line,
to_file_quoted, special_flags);
......
......@@ -95,7 +95,7 @@ pop_alignment (tree id)
align_stack * entry;
if (alignment_stack == NULL)
GCC_BAD("#pragma pack (pop) encountered without matching #pragma pack (push)");
GCC_BAD ("#pragma pack (pop) encountered without matching #pragma pack (push)");
/* If we got an identifier, strip away everything above the target
entry so that the next step will restore the state just below it. */
......@@ -122,9 +122,9 @@ pop_alignment (tree id)
#else /* not HANDLE_PRAGMA_PACK_PUSH_POP */
#define SET_GLOBAL_ALIGNMENT(ALIGN) (maximum_field_alignment = (ALIGN))
#define push_alignment(ID, N) \
GCC_BAD("#pragma pack(push[, id], <n>) is not supported on this target")
GCC_BAD ("#pragma pack(push[, id], <n>) is not supported on this target")
#define pop_alignment(ID) \
GCC_BAD("#pragma pack(pop[, id], <n>) is not supported on this target")
GCC_BAD ("#pragma pack(pop[, id], <n>) is not supported on this target")
#endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
/* #pragma pack ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment