https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120586
Bug ID: 120586 Summary: ctype_base.h has issues on alpha Product: gcc Version: 14.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: chandleg at wizardsworks dot org Target Milestone: --- I every time I try to build a native compiler with a cross, with --enable-libstdc++ I run into this. I see it on all 14.x gcc versions. glibc on the build host is 2.40 glibc on the host/target is 2.41 (host/target libraries are present on build host for use) Build options: ../gcc-14.3.0/configure --target=alpha-linux-gnu --prefix=/opt//tools --with-glibc-version=2.41 --with-sysroot=/opt/ --with-newlib --without-headers --enable-default-pie --enable-default-ssp --disable-nls --enable-shared --enable-threads=posix --enable-tls --enable-libatomic --enable-libquadmath --enable-libssp --enable-libvtv --enable-languages=c,c++ --enable-libstdcxx --host=alpha-linux-gnu --build=x86_64-slackware-linux --disable-bootstrap --enable-libgomp alpha-linux-gnu/14.2.0/../../../../alpha-linux-gnu/bin/nm" "DESTDIR=" "WERROR=" all-recursive make[3]: Entering directory '/tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3' Making all in include make[4]: Entering directory '/tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include' mkdir -p ./alpha-linux-gnu/bits/stdc++.h.gch alpha-linux-gnu-c++ -x c++-header -nostdinc++ -g -O2 -D_GNU_SOURCE -mieee -I/tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu -I/tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include -I/tmp/gcc-14.3.0/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x /tmp/gcc-14.3.0/libstdc++-v3/include/precompiled/stdc++.h \ -o alpha-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch In file included from /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:41, from /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:37, from /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/ios:46, from /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/istream:40, from /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/sstream:40, from /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/complex:45, from /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/ccomplex:39, from /tmp/gcc-14.3.0/libstdc++-v3/include/precompiled/stdc++.h:127: /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:44:35: error: '_U' was not declared in this scope 44 | static const mask upper = _U; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:45:35: error: '_L' was not declared in this scope 45 | static const mask lower = _L; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:46:35: error: '_U' was not declared in this scope 46 | static const mask alpha = _U | _L; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:46:40: error: '_L' was not declared in this scope 46 | static const mask alpha = _U | _L; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:47:35: error: '_N' was not declared in this scope 47 | static const mask digit = _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:48:35: error: '_X' was not declared in this scope 48 | static const mask xdigit = _X | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:48:40: error: '_N' was not declared in this scope 48 | static const mask xdigit = _X | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:49:35: error: '_S' was not declared in this scope 49 | static const mask space = _S; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:50:35: error: '_P' was not declared in this scope 50 | static const mask print = _P | _U | _L | _N | _B; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:50:40: error: '_U' was not declared in this scope 50 | static const mask print = _P | _U | _L | _N | _B; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:50:45: error: '_L' was not declared in this scope 50 | static const mask print = _P | _U | _L | _N | _B; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:50:50: error: '_N' was not declared in this scope 50 | static const mask print = _P | _U | _L | _N | _B; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:50:55: error: '_B' was not declared in this scope 50 | static const mask print = _P | _U | _L | _N | _B; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:51:35: error: '_P' was not declared in this scope 51 | static const mask graph = _P | _U | _L | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:51:40: error: '_U' was not declared in this scope 51 | static const mask graph = _P | _U | _L | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:51:45: error: '_L' was not declared in this scope 51 | static const mask graph = _P | _U | _L | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:51:50: error: '_N' was not declared in this scope 51 | static const mask graph = _P | _U | _L | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:52:35: error: '_C' was not declared in this scope 52 | static const mask cntrl = _C; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:53:35: error: '_P' was not declared in this scope 53 | static const mask punct = _P; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:54:35: error: '_U' was not declared in this scope 54 | static const mask alnum = _U | _L | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:54:40: error: '_L' was not declared in this scope 54 | static const mask alnum = _U | _L | _N; | ^~ /tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h:54:45: error: '_N' was not declared in this scope 54 | static const mask alnum = _U | _L | _N; | ^~ make[4]: *** [Makefile:1935: alpha-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1 make[4]: Leaving directory '/tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3/include' make[3]: *** [Makefile:577: all-recursive] Error 1 make[3]: Leaving directory '/tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3' make[2]: *** [Makefile:502: all] Error 2 make[2]: Leaving directory '/tmp/gcc-build-143/alpha-linux-gnu/libstdc++-v3' make[1]: *** [Makefile:12582: all-target-libstdc++-v3] Error 2 make[1]: Leaving directory '/tmp/gcc-build-143' make: *** [Makefile:1067: all] Error 2 cat ./alpha-linux-gnu/libstdc++-v3/include/alpha-linux-gnu/bits/ctype_base.h // Locale support -*- C++ -*- // Copyright (C) 2000-2024 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. // // ISO C++ 14882: 22.1 Locales // // Information as gleaned from /usr/include/ctype.h namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base { // Non-standard typedefs. typedef const int* __to_type; // NB: Offsets into ctype<char>::_M_table force a particular size // on the mask type. Because of this, we don't use an enum. typedef char mask; static const mask upper = _U; static const mask lower = _L; static const mask alpha = _U | _L; static const mask digit = _N; static const mask xdigit = _X | _N; static const mask space = _S; static const mask print = _P | _U | _L | _N | _B; static const mask graph = _P | _U | _L | _N; static const mask cntrl = _C; static const mask punct = _P; static const mask alnum = _U | _L | _N; #if __cplusplus >= 201103L static const mask blank = space; #endif }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace