https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65909

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-05-08
             Blocks|                            |120170
     Ever confirmed|0                           |1

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #4)
> Can the bug be marked as resolved?

I think we could still do Sandra's better solution, e.g.

--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -1026,6 +1026,7 @@ proc check_v3_target_namedlocale { args } {
        # the required named locale.
        set exe nlocale[pid].x
        set src nlocale[pid].cc
+       set localename [lindex $args 0]

        set f [open $src "w"]
        puts $f "#include <locale>"
@@ -1045,14 +1046,9 @@ proc check_v3_target_namedlocale { args } {
        puts $f "#endif"
        puts $f "    return result;"
        puts $f "}"
-       puts $f "int main (int argc, char** argv)"
+       puts $f "int main ()"
        puts $f "{"
-       puts $f "  if (argc < 2)"
-       puts $f "  {"
-       puts $f "    printf(\"locale support test not supported\\n\");"
-       puts $f "    return 1;"
-       puts $f "  }"
-       puts $f "  const char *namedloc = transform_locale(*(argv + 1));"
+       puts $f "  const char *namedloc = transform_locale(\"$localename\");"
        puts $f "  try"
        puts $f "  {"
        puts $f "    locale((const char*)namedloc);"
@@ -1076,7 +1072,7 @@ proc check_v3_target_namedlocale { args } {
          return 0
        }

-       set result [${tool}_load "./$exe" "$args" ""]
+       set result [${tool}_load "./$exe" "" ""]
        set status [lindex $result 0]

        verbose "check_v3_target_namedlocale <$args>: status is <$status>" 2


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120170
[Bug 120170] [meta-bug] C++ std::locale

Reply via email to