From: Adrian Ratiu <adrian.ratiu@collabora.com>
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 [thread overview]
Message-ID: <20210810125651.3075622-1-adrian.ratiu@collabora.com> (raw)
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 <adrian.ratiu@collabora.com>
---
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 <adrian.ratiu@collabora.com>
+
+ * configure.ac (AC_CACHE_CHECK): Drop unnecessary std=gnu99 checks
+
2021-07-28 Mark Wielaard <mark@klomp.org>
* 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
next reply other threads:[~2021-08-10 12:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 12:56 Adrian Ratiu [this message]
2021-08-23 20:21 ` Mark Wielaard
2021-08-26 12:00 ` Adrian Ratiu
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=20210810125651.3075622-1-adrian.ratiu@collabora.com \
--to=adrian.ratiu@collabora.com \
--cc=elfutils-devel@sourceware.org \
--cc=manojgupta@chromium.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).