csky-opc.h: Initialize fields of last array elements
clang gives these errors:
In file included from /Users/simark/src/binutils-gdb/opcodes/csky-dis.c:30:
/Users/simark/src/binutils-gdb/opcodes/csky-opc.h:2330:8: error: missing field 'transfer' initializer [-Werror,-Wmissing-field-initializers]
{NULL}
^
/Users/simark/src/binutils-gdb/opcodes/csky-opc.h:8126:10: error: missing field 'transfer' initializer [-Werror,-Wmissing-field-initializers]
{NULL}
^
They go away when we Initialize all fields. I noticed there used to be some
files built with -Wno-missing-field-initializers, but it's not the case
anymore, since commit e7ae278d04
. There is still
a NO_WMISSING_FIELD_INITIALIZERS variable defined in the Makefile, but it's
unused, so I removed it to avoid further confusion.
opcodes/ChangeLog:
* Makefile.am: Remove NO_WMISSING_FIELD_INITIALIZERS.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.
* configure.ac: Remove check for -Wno-missing-field-initializers.
* csky-opc.h (csky_v1_opcodes): Initialize all fields of last element.
(csky_v2_opcodes): Likewise.
This commit is contained in:
parent
a767a1c4d3
commit
f24ff6e9b5
|
@ -1,3 +1,13 @@
|
|||
2018-09-21 Simon Marchi <simon.marchi@ericsson.com>
|
||||
|
||||
* Makefile.am: Remove NO_WMISSING_FIELD_INITIALIZERS.
|
||||
* Makefile.in: Re-generate.
|
||||
* aclocal.m4: Re-generate.
|
||||
* configure: Re-generate.
|
||||
* configure.ac: Remove check for -Wno-missing-field-initializers.
|
||||
* csky-opc.h (csky_v1_opcodes): Initialize all fields of last element.
|
||||
(csky_v2_opcodes): Likewise.
|
||||
|
||||
2018-09-20 Maciej W. Rozycki <macro@linux-mips.org>
|
||||
|
||||
* arc-nps400-tbl.h: Append `ull' to large constants throughout.
|
||||
|
|
|
@ -28,7 +28,6 @@ BFDDIR = $(srcdir)/../bfd
|
|||
|
||||
WARN_CFLAGS = @WARN_CFLAGS@
|
||||
NO_WERROR = @NO_WERROR@
|
||||
NO_WMISSING_FIELD_INITIALIZERS = @NO_WMISSING_FIELD_INITIALIZERS@
|
||||
AM_CFLAGS = $(WARN_CFLAGS)
|
||||
|
||||
COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
|
|
|
@ -121,7 +121,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
|
|||
$(top_srcdir)/../config/override.m4 \
|
||||
$(top_srcdir)/../config/po.m4 \
|
||||
$(top_srcdir)/../config/progtest.m4 \
|
||||
$(top_srcdir)/../config/warnings.m4 \
|
||||
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
|
||||
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
|
||||
$(top_srcdir)/../lt~obsolete.m4 \
|
||||
|
@ -331,7 +330,6 @@ MSGMERGE = @MSGMERGE@
|
|||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NO_WERROR = @NO_WERROR@
|
||||
NO_WMISSING_FIELD_INITIALIZERS = @NO_WMISSING_FIELD_INITIALIZERS@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
|
|
|
@ -1177,7 +1177,6 @@ m4_include([../config/nls.m4])
|
|||
m4_include([../config/override.m4])
|
||||
m4_include([../config/po.m4])
|
||||
m4_include([../config/progtest.m4])
|
||||
m4_include([../config/warnings.m4])
|
||||
m4_include([../libtool.m4])
|
||||
m4_include([../ltoptions.m4])
|
||||
m4_include([../ltsugar.m4])
|
||||
|
|
|
@ -671,7 +671,6 @@ INSTALL_LIBBFD_TRUE
|
|||
MAINT
|
||||
MAINTAINER_MODE_FALSE
|
||||
MAINTAINER_MODE_TRUE
|
||||
NO_WMISSING_FIELD_INITIALIZERS
|
||||
WARN_WRITE_STRINGS
|
||||
NO_WERROR
|
||||
WARN_CFLAGS_FOR_BUILD
|
||||
|
@ -11440,7 +11439,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11443 "configure"
|
||||
#line 11442 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -11546,7 +11545,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11549 "configure"
|
||||
#line 11548 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -11946,63 +11945,6 @@ fi
|
|||
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
NO_WMISSING_FIELD_INITIALIZERS=
|
||||
save_CFLAGS="$CFLAGS"
|
||||
for real_option in -Wno-missing-field-initializers; do
|
||||
# Do the check with the no- prefix removed since gcc silently
|
||||
# accepts any -Wno-* option on purpose
|
||||
case $real_option in
|
||||
-Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
|
||||
*) option=$real_option ;;
|
||||
esac
|
||||
as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
|
||||
$as_echo_n "checking whether $CC supports $option... " >&6; }
|
||||
if eval \${$as_acx_Woption+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
CFLAGS="$option"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
eval "$as_acx_Woption=yes"
|
||||
else
|
||||
eval "$as_acx_Woption=no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
eval ac_res=\$$as_acx_Woption
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
|
||||
NO_WMISSING_FIELD_INITIALIZERS="$NO_WMISSING_FIELD_INITIALIZERS${NO_WMISSING_FIELD_INITIALIZERS:+ }$real_option"
|
||||
fi
|
||||
done
|
||||
CFLAGS="$save_CFLAGS"
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h:config.in"
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@ AC_ARG_ENABLE(targets,
|
|||
esac])dnl
|
||||
|
||||
AM_BINUTILS_WARNINGS
|
||||
ACX_PROG_CC_WARNING_OPTS([-Wno-missing-field-initializers],
|
||||
[NO_WMISSING_FIELD_INITIALIZERS])
|
||||
|
||||
AC_CONFIG_HEADERS(config.h:config.in)
|
||||
|
||||
|
|
|
@ -2327,7 +2327,7 @@ const struct csky_opcode csky_v1_opcodes[] =
|
|||
(NONE, FEREG, OPRND_SHIFT_0_BIT)),
|
||||
CSKY_ISA_FLOAT_E1,
|
||||
v1_work_fpu_readd),
|
||||
{NULL}
|
||||
{NULL, 0, {}, {}, 0, 0, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
#undef _TRANSFER
|
||||
|
@ -8123,5 +8123,5 @@ const struct csky_opcode csky_v2_opcodes[] =
|
|||
OPCODE_INFO1 (0xc4007c40,
|
||||
(0_4or16_20, DUP_AREG, OPRND_SHIFT_0_BIT)),
|
||||
CSKYV2_ISA_1E2),
|
||||
{NULL}
|
||||
{NULL, 0, {}, {}, 0, 0, 0, 0, 0, NULL}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue