RE: git: 442295c1fe84 - main - Silence GCC warnings when using libc++ headers.

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 05 Dec 2022 21:51:14 UTC
John Baldwin <jhb_at_FreeBSD.org> wrote on
Date: Wed, 30 Nov 2022 22:54:00 UTC :

> The branch main has been updated by jhb:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=442295c1fe84b4dc3e4834acdbf4ede75affe3c4
> 
> commit 442295c1fe84b4dc3e4834acdbf4ede75affe3c4
> Author: John Baldwin <jhb@FreeBSD.org>
> AuthorDate: 2022-11-30 22:50:35 +0000
> Commit: John Baldwin <jhb@FreeBSD.org>
> CommitDate: 2022-11-30 22:53:29 +0000
> 
> Silence GCC warnings when using libc++ headers.
> 
> GCC 12 raises warnings about literal operator suffixes not preceded by
> '_' in libc++ headers such as <string_view> as it doesn't recognize
> libc++ headers being an implementation of the standard.

lang/gcc12 had the following done:

author Jan Beich <jbeich@FreeBSD.org> 2022-08-20 16:06:02 +0000
committer Jan Beich <jbeich@FreeBSD.org> 2022-08-25 21:35:37 +0000
commit 86e7abbbf467e97ffa58363ca3327d08395931ee (patch)
. . .
lang/gcc12: Expose non-default -stdlib=libc++ support
Fix -stdlib=libc++ option which produced "error: unrecognized command-line option '-stdlib=libc++'".


Might doing similarly for devel/freebsd-gcc12 and using
-stdlib=libc++ for freebsd builds based on
devel/freebsd-gcc12 help with the "doesn't recognize
libc++ headers being an implementation of the standard"
issue?

> GCC 12 also warns about clang-specific pragmas in <locale>.
> 
> Disabling these warnings globally for all C++ code is not ideal, but
> is a better option than patching libc++ headers to ignore these
> warnings.



===
Mark Millard
marklmi at yahoo.com