This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix enum conversion warnings in gcc/config/i386/msformat-c.c
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: David Billinghurst <dbcygwin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 04 May 2009 16:35:28 +0100
- Subject: Re: [PATCH] Fix enum conversion warnings in gcc/config/i386/msformat-c.c
- References: <49FECFA2.4010904@gmail.com>
David Billinghurst wrote:
> Bootstrap of trunk fails on cygwin with enum conversion warnings.
> This patch fixes the warnings, but bootstrap fails further on.
>
> OK for trunk?
I can't get your patch to apply owing to whitespace changes. For example, ...
@@ -36,12 +36,12 @@
static format_length_info ms_printf_length_specs[] =
{
- { "h", FMT_LEN_h, STD_C89, NULL, 0, 0 },
... here you have the word 'static' and the open brace in column 2, where they
are flush against the start of line in the actual file.
Here's a regenerated version.
cheers,
DaveK
Index: gcc/config/i386/msformat-c.c
===================================================================
--- gcc/config/i386/msformat-c.c (revision 147098)
+++ gcc/config/i386/msformat-c.c (working copy)
@@ -36,12 +36,12 @@
static format_length_info ms_printf_length_specs[] =
{
- { "h", FMT_LEN_h, STD_C89, NULL, 0, 0 },
- { "l", FMT_LEN_l, STD_C89, NULL, 0, 0 },
- { "I32", FMT_LEN_l, STD_EXT, NULL, 0, 0 },
- { "I64", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
- { "I", FMT_LEN_L, STD_EXT, NULL, 0, 0 },
- { NULL, 0, 0, NULL, 0, 0 }
+ { "h", FMT_LEN_h, STD_C89, NULL, (enum format_lengths) 0, (enum format_std_version) 0 },
+ { "l", FMT_LEN_l, STD_C89, NULL, (enum format_lengths) 0, (enum format_std_version) 0 },
+ { "I32", FMT_LEN_l, STD_EXT, NULL, (enum format_lengths) 0, (enum format_std_version) 0 },
+ { "I64", FMT_LEN_ll, STD_EXT, NULL, (enum format_lengths) 0, (enum format_std_version) 0 },
+ { "I", FMT_LEN_L, STD_EXT, NULL, (enum format_lengths) 0, (enum format_std_version) 0 },
+ { NULL, 0, 0, NULL, (enum format_lengths) 0, (enum format_std_version) 0 }
};
static const format_flag_spec ms_printf_flag_specs[] =
@@ -55,7 +55,7 @@
{ 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, (enum format_std_version) 0 }
};
static const format_flag_pair ms_printf_flag_pairs[] =
@@ -72,7 +72,7 @@
{ 'w', 0, 0, N_("field width"), N_("field width in scanf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in scanf format"), STD_C89 },
{ '\'', 0, 0, N_("''' flag"), N_("the ''' scanf flag"), STD_EXT },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, (enum format_std_version) 0 }
};
static const format_flag_pair ms_scanf_flag_pairs[] =
@@ -84,7 +84,7 @@
static const format_flag_spec ms_strftime_flag_specs[] =
{
{ '#', 0, 0, N_("'#' flag"), N_("the '#' strftime flag"), STD_EXT },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, (enum format_std_version) 0 }
};
static const format_flag_pair ms_strftime_flag_pairs[] =
@@ -107,7 +107,7 @@
/* X/Open conversion specifiers. */
{ "C", 0, STD_EXT, { TEX_WI, BADLEN, T89_S, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
{ "S", 1, STD_EXT, { TEX_W, BADLEN, T89_S, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, (enum format_std_version) 0, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info ms_scan_char_table[] =
@@ -125,7 +125,7 @@
/* X/Open conversion specifiers. */
{ "C", 1, STD_EXT, { TEX_W, BADLEN, T89_S, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL },
{ "S", 1, STD_EXT, { TEX_W, BADLEN, T89_S, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "W", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, (enum format_std_version) 0, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info ms_time_char_table[] =
@@ -142,7 +142,7 @@
{ "%", 0, STD_C89, NOLENGTHS, "", "", NULL },
/* C99 conversion specifiers. */
{ "z", 0, STD_C99, NOLENGTHS, "#", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, (enum format_std_version) 0, NOLENGTHS, NULL, NULL, NULL }
};
const format_kind_info mingw_format_attributes[3] =