]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbsupport: replace AC_TRY_COMPILE in warning.m4
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 31 Oct 2020 12:30:59 +0000 (08:30 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 31 Oct 2020 12:30:59 +0000 (08:30 -0400)
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

gdb/ChangeLog
gdb/configure
gdbserver/ChangeLog
gdbserver/configure
gdbsupport/ChangeLog
gdbsupport/configure
gdbsupport/warning.m4

index 46e1302069e2078be0841b6d733a8d993ee12489..d9484b71bc5b4c4a6a1c90c5945aeac57761631d 100644 (file)
@@ -6,6 +6,10 @@
 
        * configure: Re-generate.
 
+2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * configure: Re-generate.
+
 2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * acinclude.m4: Modernize.
index 65904baf8045bbe2030b96e71cf07d5f8e79642d..801e7a152e7b95d183759a1409c5557822f7f89c 100755 (executable)
@@ -16563,13 +16563,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 struct scoped_restore_base {};
-                 struct scoped_restore_tmpl : public scoped_restore_base {
-                  ~scoped_restore_tmpl() {}
-                };
+                   struct scoped_restore_tmpl : public scoped_restore_base {
+                     ~scoped_restore_tmpl() {}
+                   };
 int
 main ()
 {
 const scoped_restore_base &b = scoped_restore_tmpl();
+
   ;
   return 0;
 }
index 8975cc9140695a689af8fb3ce16898ecb1c248bd..5da03da286878e208473c6d925aa5f3654da5205 100644 (file)
@@ -6,6 +6,10 @@
 
        * configure: Re-generate.
 
+2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * configure: Re-generate.
+
 2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * configure.ac: Modernize.
index 3980ae76230755186a9205043c317c9083a95653..39ec4916df7ee6f0c107b09998274d6f02d9a43e 100755 (executable)
@@ -9820,13 +9820,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 struct scoped_restore_base {};
-                 struct scoped_restore_tmpl : public scoped_restore_base {
-                  ~scoped_restore_tmpl() {}
-                };
+                   struct scoped_restore_tmpl : public scoped_restore_base {
+                     ~scoped_restore_tmpl() {}
+                   };
 int
 main ()
 {
 const scoped_restore_base &b = scoped_restore_tmpl();
+
   ;
   return 0;
 }
index 634b7c7913bf6b5829ae40439c04ac5858ae57cc..1f4f4a2b4c68c821c934ce0140213c8d2326d0c2 100644 (file)
@@ -1,3 +1,9 @@
+2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * configure: Re-generate.
+       * warning.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
+       AC_LANG_PROGRAM.
+
 2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * configure: Re-generate.
index 904403d13f1227d7a6b48fb65b5156d5463298df..1452b350ae319d4f16fbb7a7da67e97581cd3e9c 100755 (executable)
@@ -10306,13 +10306,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 struct scoped_restore_base {};
-                 struct scoped_restore_tmpl : public scoped_restore_base {
-                  ~scoped_restore_tmpl() {}
-                };
+                   struct scoped_restore_tmpl : public scoped_restore_base {
+                     ~scoped_restore_tmpl() {}
+                   };
 int
 main ()
 {
 const scoped_restore_base &b = scoped_restore_tmpl();
+
   ;
   return 0;
 }
index 649be7552dd10942dbf983a83b69179b6316cf6c..c88d4c65a078afbf6581e349b4a9526ae88ac3fa 100644 (file)
@@ -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"