https://gcc.gnu.org/g:d871a07ca522c4c54139833b9042a662745b7bd8
commit r17-5228-gd871a07ca522c4c54139833b9042a662745b7bd8 Author: Sam James <[email protected]> Date: Fri Oct 9 22:14:38 2026 +0100 fixincludes: drop obsolete C functionality test AC_C_CONST was marked as an obsolescent macro back in autoconf 2.60. I doubt we actually have C compilers with broken const building GCC. fixincludes/ChangeLog: PR bootstrap/112422 * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Drop AC_C_CONST. Diff: --- fixincludes/config.h.in | 3 -- fixincludes/configure | 83 ------------------------------------------------ fixincludes/configure.ac | 3 -- 3 files changed, 89 deletions(-) diff --git a/fixincludes/config.h.in b/fixincludes/config.h.in index 70d766b3e139..e0ca19d3dc83 100644 --- a/fixincludes/config.h.in +++ b/fixincludes/config.h.in @@ -243,8 +243,5 @@ /* Define to xatexit if the host system does not support atexit */ #undef atexit -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - /* Define to xexit if the host system does not support atexit */ #undef exit diff --git a/fixincludes/configure b/fixincludes/configure index 1a07493a9067..531e628e37ee 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -5116,89 +5116,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -# Checks for typedefs, structures, and 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 - - # Checks for library functions. ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index 6058f71e708f..6f2049f44851 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -98,9 +98,6 @@ AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS) AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, vasprintf, memmem]) AC_CHECK_DECLS(m4_split(m4_normalize(fixincludes_UNLOCKED_FUNCS))) -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - # Checks for library functions. GCC_AC_FUNC_MMAP_BLACKLIST
