tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 99bc37686413de8cf494b5ad3eec5503e125a0e1
parent ed038d676033bf17672b92c44e08ef4776e7e484
Author: Chris Peterson <cpeterson@mozilla.com>
Date:   Tue, 14 Oct 2025 20:07:58 +0000

Bug 1994108 - Enable some C++23 compat warnings. r=firefox-build-system-reviewers,glandium

We can remove these flags after we compile as C++23 (bug 1880762).

-Wdeprecated-literal-operator warns about whitespace between a string literal and a user-defined literal operator. This flag is available in clang 17 and gcc 15. It's enabled in clang 20 by default and in gcc 15 with -std=c++23. In the meantime, we can enable this warning to catch regressions before we update to clang 20.

-Winvalid-utf8 warns about invalid UTF-8 characters in source files. This flag is available in clang 15 and gcc 13. It's enabled in gcc 13 with -std=c++23 when compiling source files as UTF-8 (like we do).

Differential Revision: https://phabricator.services.mozilla.com/D268492

Diffstat:
Mbuild/moz.configure/warnings.configure | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/build/moz.configure/warnings.configure b/build/moz.configure/warnings.configure @@ -110,6 +110,11 @@ check_and_add_warning("-Wno-deprecated-enum-enum-conversion", cxx_compiler) check_and_add_warning("-Wno-deprecated-this-capture", cxx_compiler) check_and_add_warning("-Wno-error=deprecated", when=building_with_gcc) +# Enable some C++23 compat warnings. We can remove these flags after we compile +# as C++23 (bug 1880762) because they will be enabled by default: +check_and_add_warning("-Wdeprecated-literal-operator", cxx_compiler) +check_and_add_warning("-Winvalid-utf8") + # catches possible misuse of the comma operator check_and_add_warning("-Wcomma", cxx_compiler)