public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Fix gdb.cp/break-f-std-string.cc with older gcc
Date: Thu, 12 May 2022 14:57:33 +0200	[thread overview]
Message-ID: <304ed9e6-1375-9235-900c-5b09bc8ca700@suse.de> (raw)
In-Reply-To: <60c929b0-f7e1-c0a7-ce44-daa06dbc860f@palves.net>

On 5/12/22 14:47, Pedro Alves wrote:
> On 2022-05-12 12:45, Tom de Vries wrote:
> 
>> [gdb/testsuite] Fix gdb.cp/break-f-std-string.cc with older gcc
>>
>> ---
>>   gdb/testsuite/gdb.cp/break-f-std-string.cc | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/gdb/testsuite/gdb.cp/break-f-std-string.cc b/gdb/testsuite/gdb.cp/break-f-std-string.cc
>> index 454ab4c42ea..cbbfeebac60 100644
>> --- a/gdb/testsuite/gdb.cp/break-f-std-string.cc
>> +++ b/gdb/testsuite/gdb.cp/break-f-std-string.cc
>> @@ -17,6 +17,20 @@
>>   
>>   #include <string>
>>   
>> +#if _GLIBCXX_USE_CXX11_ABI == 1
>> +#if defined (__GNUC__) && (__GNUC__ >= 5) && (__GNUC__ <= 8)
>> +
>> +// Work around missing std::string typedef before gcc commit
>> +// "Define std::string and related typedefs outside __cxx11 namespace".
> 
> Since we try to follow the GDB conventions in the tests too, this should
> use /**/ comments.
> 

Ack, fixed.

>> +
>> +namespace std {
>> +using namespace __cxx11;
> 
> Why is this "using namespace __cxx11;" needed?  I guess something about the
> "related typedefs" mentioned in the comment?  The test passes for me without
> that, on GCC 6.5 (the only affected compiler I have handy atm), like:
> 
> namespace std {
> typedef __cxx11::string string;
> }
> 

Works for me as well, so removed.

> Otherwise LGTM.
> 

Thanks for the review, committed.

Thanks,
- Tom

> Pedro Alves
> 
>> +typedef __cxx11::string string;
>> +}
>> +
>> +#endif
>> +#endif
>> +
>>   void
>>   f (std::string s)
>>   {
>>
> 

      reply	other threads:[~2022-05-12 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 11:45 Tom de Vries
2022-05-12 12:47 ` Pedro Alves
2022-05-12 12:57   ` Tom de Vries [this message]

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=304ed9e6-1375-9235-900c-5b09bc8ca700@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /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: link
Be 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).