From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ie4MLOdQzmoCoQIAWB0awg (envelope-from ) for ; Tue, 13 Oct 2026 11:40:23 -0400 Received: by simark.ca (Postfix, from userid 112) id AEA061E051; Tue, 13 Oct 2026 11:40:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 42CA21E04E for ; Tue, 13 Oct 2026 11:40:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA8D44BA798F for ; Tue, 13 Oct 2026 15:40:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA8D44BA798F Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id D70A14BA23F9 for ; Tue, 13 Oct 2026 15:39:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D70A14BA23F9 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D70A14BA23F9 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791905954; cv=none; b=dRyh5FZUNq/XnT0UEsQMcTEjbKf1SI9W4hve9bkH7rAgxKtf0wJ6QRHXOo1dVuzGVqNydQhBojocYzQWl2KF88X3s66qEysTssix6hZgXWjRkpONbC1XWuAYYUfymzpyD2cpVVZqliB/KpiaeyDOz2JErO5qulfUf1/q0SDZ8dY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791905954; c=relaxed/simple; bh=3AOvZnEacGS+3ILF2TBw5v+cqXKxa/XyAgRUsMqhIUo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=r5XydFPKzrudytiMemJCtFerAvEGteQy6VgAqcNYneGyaDLDDKThFyiURLmh0UO7vtAyRncosEuIE1MbDDRvPgsKVTbtTEgfeEpUxjKpFfz6tyyFtEPvEAv8KUmsonga/zD50k10EYPQvLPgkZe/I+WJsPQyAYnXeDH86Pwo/vg= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D70A14BA23F9 Received: by simark.ca (Postfix) id 71B911E091; Tue, 13 Oct 2026 11:39:11 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 13/16] gdb: remove AC_C_CONST and AC_C_INLINE Date: Tue, 13 Oct 2026 11:35:59 -0400 Message-ID: <20261013153657.1610298-14-simon.marchi@efficios.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013153657.1610298-1-simon.marchi@efficios.com> References: <20261013153657.1610298-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org These macros are meant to work around pre-ANSI C compilers that don't support the const and inline keywords. GDB requires a C++17 compiler, so they are not useful. Remove them from configure.ac. Regenerate config.in and configure. Change-Id: I73a55ee17ab3fd99d8edae519db32854bf6bae23 --- gdb/config.in | 9 ---- gdb/configure | 123 ----------------------------------------------- gdb/configure.ac | 2 - 3 files changed, 134 deletions(-) diff --git a/gdb/config.in b/gdb/config.in index 0f0afa6f26b0..9cfa1026d08f 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -817,15 +817,6 @@ /* Use structured /proc on Solaris. */ #undef _STRUCTURED_PROC -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - /* Define to `int' if does not define. */ #undef pid_t diff --git a/gdb/configure b/gdb/configure index 19ecb5d73187..5290d29efbce 100755 --- a/gdb/configure +++ b/gdb/configure @@ -29497,129 +29497,6 @@ fi # Checks for compiler characteristics. # # ------------------------------------- # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : diff --git a/gdb/configure.ac b/gdb/configure.ac index fc21623961d0..b1e0a82b9b07 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1508,8 +1508,6 @@ AC_CHECK_TYPES(socklen_t, [], [], # Checks for compiler characteristics. # # ------------------------------------- # -AC_C_CONST -AC_C_INLINE AC_C_BIGENDIAN # ------------------------------ # -- 2.56.0