aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/warning.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport/warning.m4')
-rw-r--r--gdbsupport/warning.m424
1 files changed, 16 insertions, 8 deletions
diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
index 649be75..c88d4c6 100644
--- a/gdbsupport/warning.m4
+++ b/gdbsupport/warning.m4
@@ -139,15 +139,23 @@ then
# Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
# fixed in GCC 4.9. This test is derived from the gdb
# source code that triggered this bug in GCC.
- AC_TRY_COMPILE(
- [struct scoped_restore_base {};
- struct scoped_restore_tmpl : public scoped_restore_base {
- ~scoped_restore_tmpl() {}
- };],
- [const scoped_restore_base &b = scoped_restore_tmpl();],
- WARN_CFLAGS="${WARN_CFLAGS} $w",)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [struct scoped_restore_base {};
+ struct scoped_restore_tmpl : public scoped_restore_base {
+ ~scoped_restore_tmpl() {}
+ };],
+ [const scoped_restore_base &b = scoped_restore_tmpl();]
+ )],
+ [WARN_CFLAGS="${WARN_CFLAGS} $w"],
+ []
+ )
else
- AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([], [])],
+ [WARN_CFLAGS="${WARN_CFLAGS} $w"],
+ []
+ )
fi
CFLAGS="$saved_CFLAGS"
CXXFLAGS="$saved_CXXFLAGS"