gdbsupport: replace AC_TRY_COMPILE in warning.m4

Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE + AC_LANG_PROGRAM.

All changes in generated configure files are insignificant whitespace
changes.

gdb/ChangeLog:

	* configure: Re-generate.

gdbserver/ChangeLog:

	* configure: Re-generate.

gdbsupport/ChangeLog:

	* configure: Re-generate.
	* warning.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
	AC_LANG_PROGRAM.

Change-Id: I517bd20ec3af960ad999a586761df0ac8959a3fc
This commit is contained in:
Simon Marchi
2020-10-25 21:43:20 -04:00
parent c3370398cd
commit a0de388f77
4 changed files with 28 additions and 17 deletions

7
gdb/configure vendored
View File

@@ -16563,13 +16563,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
struct scoped_restore_base {}; struct scoped_restore_base {};
struct scoped_restore_tmpl : public scoped_restore_base { struct scoped_restore_tmpl : public scoped_restore_base {
~scoped_restore_tmpl() {} ~scoped_restore_tmpl() {}
}; };
int int
main () main ()
{ {
const scoped_restore_base &b = scoped_restore_tmpl(); const scoped_restore_base &b = scoped_restore_tmpl();
; ;
return 0; return 0;
} }

7
gdbserver/configure vendored
View File

@@ -9820,13 +9820,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
struct scoped_restore_base {}; struct scoped_restore_base {};
struct scoped_restore_tmpl : public scoped_restore_base { struct scoped_restore_tmpl : public scoped_restore_base {
~scoped_restore_tmpl() {} ~scoped_restore_tmpl() {}
}; };
int int
main () main ()
{ {
const scoped_restore_base &b = scoped_restore_tmpl(); const scoped_restore_base &b = scoped_restore_tmpl();
; ;
return 0; return 0;
} }

View File

@@ -10306,13 +10306,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
struct scoped_restore_base {}; struct scoped_restore_base {};
struct scoped_restore_tmpl : public scoped_restore_base { struct scoped_restore_tmpl : public scoped_restore_base {
~scoped_restore_tmpl() {} ~scoped_restore_tmpl() {}
}; };
int int
main () main ()
{ {
const scoped_restore_base &b = scoped_restore_tmpl(); const scoped_restore_base &b = scoped_restore_tmpl();
; ;
return 0; return 0;
} }

View File

@@ -139,15 +139,23 @@ then
# Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
# fixed in GCC 4.9. This test is derived from the gdb # fixed in GCC 4.9. This test is derived from the gdb
# source code that triggered this bug in GCC. # source code that triggered this bug in GCC.
AC_TRY_COMPILE( AC_COMPILE_IFELSE(
[struct scoped_restore_base {}; [AC_LANG_PROGRAM(
struct scoped_restore_tmpl : public scoped_restore_base { [struct scoped_restore_base {};
~scoped_restore_tmpl() {} struct scoped_restore_tmpl : public scoped_restore_base {
};], ~scoped_restore_tmpl() {}
[const scoped_restore_base &b = scoped_restore_tmpl();], };],
WARN_CFLAGS="${WARN_CFLAGS} $w",) [const scoped_restore_base &b = scoped_restore_tmpl();]
)],
[WARN_CFLAGS="${WARN_CFLAGS} $w"],
[]
)
else else
AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [])],
[WARN_CFLAGS="${WARN_CFLAGS} $w"],
[]
)
fi fi
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
CXXFLAGS="$saved_CXXFLAGS" CXXFLAGS="$saved_CXXFLAGS"