public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: cast getpid result Date: Tue, 5 Jul 2022 06:07:00 +0000 (GMT) [thread overview] Message-ID: <20220705060700.8754E385AE6A@sourceware.org> (raw) https://gcc.gnu.org/g:dc52f32eb010e2eede0e022836ae00898ccce3fb commit dc52f32eb010e2eede0e022836ae00898ccce3fb Author: Alexandre Oliva <oliva@adacore.com> Date: Tue Jul 5 03:05:01 2022 -0300 libstdc++: testsuite: cast getpid result On vxworks, in kernel mode, getpid's return type is a pointer type, so std::to_string on it fails overload resolution. Restore the type cast from the original patch that suggested adding the pid. for libstdc++/ChangeLog * testsuite/util/testsuite_fs.h (nonexistent_path): Convert the getpid result to an integral type. Diff: --- libstdc++-v3/testsuite/util/testsuite_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h index 908fcdbcaee..25f8f734dc7 100644 --- a/libstdc++-v3/testsuite/util/testsuite_fs.h +++ b/libstdc++-v3/testsuite/util/testsuite_fs.h @@ -163,7 +163,7 @@ namespace __gnu_test file.resize(64); // The combination of random counter and PID should be unique for a given // run of the testsuite. - file += std::to_string(::getpid()); + file += std::to_string((unsigned long) ::getpid()); p = std::move(file); if (test_fs::exists(p)) throw test_fs::filesystem_error("Failed to generate unique pathname", p,
next reply other threads:[~2022-07-05 6:07 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-05 6:07 Alexandre Oliva [this message] -- strict thread matches above, loose matches on Subject: below -- 2022-07-05 5:51 Alexandre Oliva
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220705060700.8754E385AE6A@sourceware.org \ --to=aoliva@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).