From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by sourceware.org (Postfix) with ESMTPS id 8D8BF385AC1C for ; Tue, 10 Aug 2021 12:57:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8D8BF385AC1C Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 7DD361F42FFD From: Adrian Ratiu To: elfutils-devel@sourceware.org Cc: manojgupta@chromium.org Subject: [PATCH] configure.ac: drop unnecessary gnu99 extension checks Date: Tue, 10 Aug 2021 15:56:51 +0300 Message-Id: <20210810125651.3075622-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2021 12:57:17 -0000 It is true that Clang does not support all gnu99 extensions [1], but not all of them are used in the codebase and over time there have been code cleanup efforts to improve Clang support. For example after commit 779c57ea ("readelf: Pull advance_pc() in file scope") there are no more nested function declarations and elfutils now builds fine with Clang. So in the interest of enabling Clang builds we remove the only remaining blocker: the configure checks for nested functions and variable length arrays which are also unused. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=24964 Signed-off-by: Adrian Ratiu --- ChangeLog | 4 ++++ configure.ac | 11 ----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12b8f403..32f5b68d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2021-08-10 Adrian Ratiu + + * configure.ac (AC_CACHE_CHECK): Drop unnecessary std=gnu99 checks + 2021-07-28 Mark Wielaard * configure.ac (AC_CHECK_DECLS): Add reallocarray check. diff --git a/configure.ac b/configure.ac index 7caff2c5..c14eb9f6 100644 --- a/configure.ac +++ b/configure.ac @@ -112,17 +112,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s; -} - -double bar (double a, double b) -{ - double square (double z) { return z * z; } - return square (a) + square (b); -} - -void baz (int n) -{ - struct S { int x[[n]]; }; }])], ac_cv_c99=yes, ac_cv_c99=no) CFLAGS="$old_CFLAGS"]) -- 2.32.0