History

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.

Andreas Rheinhardt committed 1 year ago

Commit 890b8da1 parent 830fab62 files · +0 −8Browse files

Unified · Split

2 files
  1. configure +0 −5
  2. doc/developer.texi +0 −3
configure+0−5
@@ -7467,7 +7467,6 @@ fi · 7466 unmodified lines
7467enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"7467enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
7468 7468
7469# add some useful compiler flags if supported7469# add some useful compiler flags if supported
7470check_cflags -Wdeclaration-after-statement
7471check_cflags -Wall7470check_cflags -Wall
7472check_cflags -Wdisabled-optimization7471check_cflags -Wdisabled-optimization
7473check_cflags -Wpointer-arith7472check_cflags -Wpointer-arith
@@ -7504,10 +7503,6 @@ check_disable_warning -Wno-bool-operation · 30 unmodified lines
7504check_disable_warning -Wno-char-subscripts7503check_disable_warning -Wno-char-subscripts
7505check_disable_warning -Wno-implicit-const-int-float-conversion7504check_disable_warning -Wno-implicit-const-int-float-conversion
7506 7505
7507# Disable mixed decl and code warning for Objective-C
7508test_objcflags $unknown_warning_flags '-Wdeclaration-after-statement' &&
7509 add_objcflags '-Wno-declaration-after-statement'
7510
7511check_disable_warning_headers(){7506check_disable_warning_headers(){
7512 warning_flag=-W${1#-Wno-}7507 warning_flag=-W${1#-Wno-}
7513 test_cflags $warning_flag && add_cflags_headers $17508 test_cflags $warning_flag && add_cflags_headers $1
doc/developer.texi+0−3
@@ -70,9 +70,6 @@ variable-length arrays; · 69 unmodified lines
70 70
71@item71@item
72complex numbers;72complex numbers;
73
74@item
75mixed statements and declarations.
76@end itemize73@end itemize
77 74
78@subsection SIMD/DSP75@subsection SIMD/DSP

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t