Commit bc640185e7 for ffmpeg

commit bc640185e73f3fa4ae2682683fed0eec9a170173
Author: Jun Zhao <barryjzhao@tencent.com>
Date:   Fri Nov 13 20:36:24 2026 +0800

    configure: let the C compiler decide check_warning

    Probe C++ first and C last so that the return status of check_warning()
    reflects whether the C compiler accepted the option, matching
    check_allcflags() after 4b39049f44.

    Otherwise, when C accepts a warning flag while C++ is missing or uses a
    different frontend that rejects it, check_warning() adds the flag to
    CFLAGS yet returns non-zero.

    Suggested-by: Kacper Michajłow <kasper93@gmail.com>
    Signed-off-by: Jun Zhao <barryjzhao@tencent.com>

diff --git a/configure b/configure
index 6979344888..65fc2c3a39 100755
--- a/configure
+++ b/configure
@@ -7832,8 +7832,8 @@ enabled debug && add_allcflags -g"$debuglevel" && add_asflags -g"$debuglevel"
 check_warning(){
     warning_flag=$1
     flag_to_add=${2:-$1}
-    test_cflags -Werror $warning_flag && add_cflags $flag_to_add
     test_cxxflags -Werror $warning_flag && add_cxxflags $flag_to_add
+    test_cflags -Werror $warning_flag && add_cflags $flag_to_add
 }

 check_disable_warning(){