Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] configure: Allow mixing declarations and statements
Date: Sun, 30 Mar 2025 17:37:00 +0200
Message-ID: <AS8P250MB07446AE8C7CDDD1AC795DD568FA22@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)

[-- Attachment #1: Type: text/plain, Size: 27 bytes --]

Patch attached.

- Andreas

[-- Attachment #2: 0001-configure-Allow-mixing-declarations-and-statements.patch --]
[-- Type: text/x-patch, Size: 1765 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2025-03-30 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-30 15:37 Andreas Rheinhardt [this message]
2025-03-30 15:45 ` Zhao Zhili
2025-03-30 18:18 ` Marvin Scholz
2025-03-30 19:03 ` Michael Niedermayer
2025-03-30 20:56 ` softworkz .

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS8P250MB07446AE8C7CDDD1AC795DD568FA22@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git