On Wed, Oct 21, 2026 at 08:12:10PM +0200, Kirill A. Korinsky wrote:
> ports@,
>
> here a diff to address a very noisy warning which porduces tons of lines
> like that during gcc build:
>
> In file included from
> /usr/ports/pobj/gcc-16.2.0/build-amd64/prev-x86_64-unknown-openbsd/libstdc++-v3/include/bits/locale_facets.h:43,
> from
> /usr/ports/pobj/gcc-16.2.0/build-amd64/prev-x86_64-unknown-openbsd/libstdc++-v3/include/bits/basic_ios.h:40,
> from
> /usr/ports/pobj/gcc-16.2.0/build-amd64/prev-x86_64-unknown-openbsd/libstdc++-v3/include/ios:48,
> from
> /usr/ports/pobj/gcc-16.2.0/build-amd64/prev-x86_64-unknown-openbsd/libstdc++-v3/include/bits/ostream.h:43,
> from
> /usr/ports/pobj/gcc-16.2.0/build-amd64/prev-x86_64-unknown-openbsd/libstdc++-v3/include/bits/unique_ptr.h:42,
> from
> /usr/ports/pobj/gcc-16.2.0/build-amd64/prev-x86_64-unknown-openbsd/libstdc++-v3/include/memory:80,
> from /usr/ports/pobj/gcc-16.2.0/gcc-16.2.0/gcc/system.h:231,
> from
> /usr/ports/pobj/gcc-16.2.0/gcc-16.2.0/gcc/builtins.cc:25:
> /usr/ports/pobj/gcc-16.2.0/build-amd64/prev-x86_64-unknown-openbsd/libstdc++-v3/include/alpha-unknown-openbsd/bits/ctype_base.h:52:77:
> warning: overflow in conversion from 'int' to 'std::ctype_base::mask' {aka
> 'char'} changes value from '151' to '-105' [-Woverflow]
> 52 | static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L |
> _CTYPE_N | _CTYPE_B;
> |
> ^
>
> the base was fixed by jca@ a few years ago the same way:
> https://github.com/openbsd/src/commit/07a83dd91d27a6914c15c0b46bb62ff9a75e6f0c
Actually it was fixed by espie in 2012, the commit you mention
preserved the (char) cast. I failed to spot it and port it to
lang/gcc/8. ok jca@
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/lang/gcc/16/Makefile,v
> diff -u -p -r1.33 Makefile
> --- Makefile 21 Oct 2026 10:40:07 -0000 1.33
> +++ Makefile 21 Oct 2026 17:57:33 -0000
> @@ -15,7 +15,7 @@ USE_NOEXECONLY = Yes
> # - turn -Wimplicit-function-declaration and -Wincompatible-pointer-types
> # into simple warnings.
> V = 16.2.0
> -REVISION = 1
> +REVISION = 2
> GCC_PKGSPEC = >=16,<17
>
> # aarch64, powerpc64 and sparc64 bootstrap contain only gdc
> Index: patches/patch-libstdc++-v3_config_os_bsd_openbsd_ctype_base_h
> ===================================================================
> RCS file:
> /home/cvs/ports/lang/gcc/16/patches/patch-libstdc++-v3_config_os_bsd_openbsd_ctype_base_h,v
> diff -u -p -r1.1.1.1 patch-libstdc++-v3_config_os_bsd_openbsd_ctype_base_h
> --- patches/patch-libstdc++-v3_config_os_bsd_openbsd_ctype_base_h 2 Jun
> 2026 20:00:17 -0000 1.1.1.1
> +++ patches/patch-libstdc++-v3_config_os_bsd_openbsd_ctype_base_h 21 Oct
> 2026 17:56:52 -0000
> @@ -12,7 +12,7 @@ Index: libstdc++-v3/config/os/bsd/openbs
> + static const mask digit = _CTYPE_N;
> + static const mask xdigit = _CTYPE_N | _CTYPE_X;
> + static const mask space = _CTYPE_S;
> -+ static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N |
> _CTYPE_B;
> ++ static const mask print = char(_CTYPE_P | _CTYPE_U | _CTYPE_L |
> _CTYPE_N | _CTYPE_B);
> + static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N;
> + static const mask cntrl = _CTYPE_C;
> + static const mask punct = _CTYPE_P;
>
>
> --
> wbr, Kirill
>
--
jca