lto-opts.c (register_user_option_p, [...]): Make type argument unsigned.

* lto-opts.c (register_user_option_p, lto_register_user_option):
	Make type argument unsigned.
	* lto-streamer.h (lto_register_user_option): Make type argument
	unsigned.
	* opth-gen.awk: Make CL_* macros unsigned.
	* opts-common.c (find_opt): Make lang_mask argument unsigned.
	* opts.h (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER,
	CL_TARGET, CL_COMMON, CL_SEPARATE_NARGS_MASK, CL_SEPARATE_ALIAS,
	CL_NO_DRIVER_ARG, CL_REJECT_DRIVER, CL_SAVE, CL_DISABLED,
	CL_REPORT, CL_JOINED, CL_SEPARATE, CL_REJECT_NEGATIVE,
	CL_MISSING_OK, CL_UINTEGER, CL_UNDOCUMENTED): Make unsigned.
	(find_opt): Make lang_mask argument unsigned.

From-SVN: r171701
This commit is contained in:
Joseph Myers 2011-03-29 22:59:34 +01:00 committed by Joseph Myers
parent 76763a6d3f
commit eb50f63aff
6 changed files with 45 additions and 29 deletions

View File

@ -1,3 +1,18 @@
2011-03-29 Joseph Myers <joseph@codesourcery.com>
* lto-opts.c (register_user_option_p, lto_register_user_option):
Make type argument unsigned.
* lto-streamer.h (lto_register_user_option): Make type argument
unsigned.
* opth-gen.awk: Make CL_* macros unsigned.
* opts-common.c (find_opt): Make lang_mask argument unsigned.
* opts.h (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER,
CL_TARGET, CL_COMMON, CL_SEPARATE_NARGS_MASK, CL_SEPARATE_ALIAS,
CL_NO_DRIVER_ARG, CL_REJECT_DRIVER, CL_SAVE, CL_DISABLED,
CL_REPORT, CL_JOINED, CL_SEPARATE, CL_REJECT_NEGATIVE,
CL_MISSING_OK, CL_UINTEGER, CL_UNDOCUMENTED): Make unsigned.
(find_opt): Make lang_mask argument unsigned.
2011-03-29 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/48331

View File

@ -194,7 +194,7 @@ input_string_block (struct lto_input_block *ib)
Among others, optimization options may well be appropriate here. */
static bool
register_user_option_p (size_t code, int type)
register_user_option_p (size_t code, unsigned int type)
{
if (type == CL_TARGET)
return true;
@ -215,7 +215,8 @@ register_user_option_p (size_t code, int type)
If relevant to LTO, save it in the user options vector. */
void
lto_register_user_option (size_t code, const char *arg, int value, int type)
lto_register_user_option (size_t code, const char *arg, int value,
unsigned int type)
{
if (register_user_option_p (code, type))
{

View File

@ -1,7 +1,7 @@
/* Data structures and declarations used for reading and writing
GIMPLE to a file stream.
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
Contributed by Doug Kwan <dougkwan@google.com>
This file is part of GCC.
@ -933,7 +933,7 @@ extern GTY(()) VEC(tree,gc) *lto_global_var_decls;
/* In lto-opts.c. */
extern void lto_register_user_option (size_t, const char *, int, int);
extern void lto_register_user_option (size_t, const char *, int, unsigned int);
extern void lto_read_file_options (struct lto_file_decl_data *);
extern void lto_write_options (void);
extern void lto_reissue_options (void);

View File

@ -451,9 +451,9 @@ for (i = 0; i < n_langs; i++) {
macros[i] = "CL_" langs[i]
gsub( "[^" alnum "_]", "X", macros[i] )
s = substr(" ", length (macros[i]))
print "#define " macros[i] s " (1 << " i ")"
print "#define " macros[i] s " (1U << " i ")"
}
print "#define CL_LANG_ALL ((1 << " n_langs ") - 1)"
print "#define CL_LANG_ALL ((1U << " n_langs ") - 1)"
print ""
print "enum opt_code"

View File

@ -1,5 +1,5 @@
/* Command line option handling.
Copyright (C) 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
This file is part of GCC.
@ -52,7 +52,7 @@ static void prune_options (struct cl_decoded_option **, unsigned int *);
front end, the longest match for a different front end is returned
(or N_OPTS if none) and the caller emits an error message. */
size_t
find_opt (const char *input, int lang_mask)
find_opt (const char *input, unsigned int lang_mask)
{
size_t mn, mn_orig, mx, md, opt_len;
size_t match_wrong_lang;

View File

@ -1,5 +1,5 @@
/* Command line option handling.
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
@ -83,12 +83,12 @@ extern const unsigned int cl_options_count;
extern const char *const lang_names[];
extern const unsigned int cl_lang_count;
#define CL_PARAMS (1 << 11) /* Fake entry. Used to display --param info with --help. */
#define CL_WARNING (1 << 12) /* Enables an (optional) warning message. */
#define CL_OPTIMIZATION (1 << 13) /* Enables an (optional) optimization. */
#define CL_DRIVER (1 << 14) /* Driver option. */
#define CL_TARGET (1 << 15) /* Target-specific option. */
#define CL_COMMON (1 << 16) /* Language-independent. */
#define CL_PARAMS (1U << 11) /* Fake entry. Used to display --param info with --help. */
#define CL_WARNING (1U << 12) /* Enables an (optional) warning message. */
#define CL_OPTIMIZATION (1U << 13) /* Enables an (optional) optimization. */
#define CL_DRIVER (1U << 14) /* Driver option. */
#define CL_TARGET (1U << 15) /* Target-specific option. */
#define CL_COMMON (1U << 16) /* Language-independent. */
#define CL_MIN_OPTION_CLASS CL_PARAMS
#define CL_MAX_OPTION_CLASS CL_COMMON
@ -101,20 +101,20 @@ extern const unsigned int cl_lang_count;
/* Options marked with CL_SEPARATE take a number of separate arguments
(1 to 4) that is one more than the number in this bit-field. */
#define CL_SEPARATE_NARGS_SHIFT 17
#define CL_SEPARATE_NARGS_MASK (3 << CL_SEPARATE_NARGS_SHIFT)
#define CL_SEPARATE_NARGS_MASK (3U << CL_SEPARATE_NARGS_SHIFT)
#define CL_SEPARATE_ALIAS (1 << 19) /* Option is an alias when used with separate argument. */
#define CL_NO_DRIVER_ARG (1 << 20) /* Option takes no argument in the driver. */
#define CL_REJECT_DRIVER (1 << 21) /* Reject this option in the driver. */
#define CL_SAVE (1 << 22) /* Target-specific option for attribute. */
#define CL_DISABLED (1 << 23) /* Disabled in this configuration. */
#define CL_REPORT (1 << 24) /* Report argument with -fverbose-asm */
#define CL_JOINED (1 << 25) /* If takes joined argument. */
#define CL_SEPARATE (1 << 26) /* If takes a separate argument. */
#define CL_REJECT_NEGATIVE (1 << 27) /* Reject no- form. */
#define CL_MISSING_OK (1 << 28) /* Missing argument OK (joined). */
#define CL_UINTEGER (1 << 29) /* Argument is an integer >=0. */
#define CL_UNDOCUMENTED (1 << 30) /* Do not output with --help. */
#define CL_SEPARATE_ALIAS (1U << 19) /* Option is an alias when used with separate argument. */
#define CL_NO_DRIVER_ARG (1U << 20) /* Option takes no argument in the driver. */
#define CL_REJECT_DRIVER (1U << 21) /* Reject this option in the driver. */
#define CL_SAVE (1U << 22) /* Target-specific option for attribute. */
#define CL_DISABLED (1U << 23) /* Disabled in this configuration. */
#define CL_REPORT (1U << 24) /* Report argument with -fverbose-asm */
#define CL_JOINED (1U << 25) /* If takes joined argument. */
#define CL_SEPARATE (1U << 26) /* If takes a separate argument. */
#define CL_REJECT_NEGATIVE (1U << 27) /* Reject no- form. */
#define CL_MISSING_OK (1U << 28) /* Missing argument OK (joined). */
#define CL_UINTEGER (1U << 29) /* Argument is an integer >=0. */
#define CL_UNDOCUMENTED (1U << 30) /* Do not output with --help. */
/* Flags for an enumerated option argument. */
#define CL_ENUM_CANONICAL (1 << 0) /* Canonical for this value. */
@ -280,7 +280,7 @@ extern const char **in_fnames;
extern unsigned num_in_fnames;
size_t find_opt (const char *input, int lang_mask);
size_t find_opt (const char *input, unsigned int lang_mask);
extern int integral_argument (const char *arg);
extern bool enum_value_to_arg (const struct cl_enum_arg *enum_args,
const char **argp, int value,