Am 31.10.24 um 21:57 schrieb David Malcolm:
On Thu, 2024-10-31 at 11:36 -0700, Andrew Pinski wrote:
This is recorded as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117361 already.
I think one idea is to set LANG=C before doing the self-check. But I
will allow David and other think of better ways of fixing it.

Sorry about this.  For some reason this isn't reproducing for me.

That said, I think setting LANG=C when running selftests is probably
the best solution.  How does the attached (untested) patch look?

Or you do the same as for https://gcc.gnu.org/PR115203 ; namely,
your commit https://gcc.gnu.org/r15-866-g2dbb1c124c1e585dc413132d7a8d4be62c6b7baa

added:

   test_diagnostic_path (pretty_printer *event_pp)
   : simple_diagnostic_path (event_pp)
   {
+    disable_event_localization ();
   }

and then disabled the _(...) localization for those:

-  text_info ti (_(fmt), &ap, 0, nullptr, &rich_loc);
+  text_info ti (m_localize_events ? _(fmt) : fmt,
+               &ap, 0, nullptr, &rich_loc);


In any case, I think it would be good to either use LC_ALL or
code like disable_event_localization but not both, depending
on the code path.

Tobias

Reply via email to