From b2a09f78b72d6c54115166297a95d0fc093eac00 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sun, 30 Mar 2025 17:26:05 +0200
Subject: [PATCH] configure: Allow mixing declarations and statements

This C90 rule forces us to use a too big scope and should
therefore be dropped. Given that we already require C11,
all supported compilers can handle mixed declarations
and statements just fine.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 configure          | 5 -----
 doc/developer.texi | 3 ---
 2 files changed, 8 deletions(-)

diff --git a/configure b/configure
index 4559962a4a..242c81a05a 100755
--- a/configure
+++ b/configure
@@ -7451,7 +7451,6 @@ fi
 enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
 
 # add some useful compiler flags if supported
-check_cflags -Wdeclaration-after-statement
 check_cflags -Wall
 check_cflags -Wdisabled-optimization
 check_cflags -Wpointer-arith
@@ -7488,10 +7487,6 @@ check_disable_warning -Wno-bool-operation
 check_disable_warning -Wno-char-subscripts
 check_disable_warning -Wno-implicit-const-int-float-conversion
 
-# Disable mixed decl and code warning for Objective-C
-test_objcflags $unknown_warning_flags '-Wdeclaration-after-statement' &&
-    add_objcflags '-Wno-declaration-after-statement'
-
 check_disable_warning_headers(){
     warning_flag=-W${1#-Wno-}
     test_cflags $warning_flag && add_cflags_headers $1
diff --git a/doc/developer.texi b/doc/developer.texi
index 757e0f0ac1..108558b9e0 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -70,9 +70,6 @@ variable-length arrays;
 
 @item
 complex numbers;
-
-@item
-mixed statements and declarations.
 @end itemize
 
 @subsection SIMD/DSP
-- 
2.45.2