This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PR 2767, V3 regression failure on strstr et al
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: PR 2767, V3 regression failure on strstr et al
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Tue, 22 May 2001 04:23:14 -0500 (CDT)
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
- References: <01051822540300.22297@umbriel>
>On 18-May-2001, Stephen M. Webb <stephen@bregmasoft.com> wrote:
>> #include <bits/std_cstddef.h>
>>
>> #pragma GCC system_header
>> +
>> + #define memchr glibcpp_hidden_memchr
>> + #define strchr glibcpp_hidden_strchr
>> + #define strpbrk glibcpp_hidden_strpbrk
>> + #define strrchr glibcpp_hidden_strrchr
>> + #define strstr glibcpp_hidden_strstr
[...include system string.h...]
The original bug report had some form of this:
#include <cstring>
using namespace std;
void f() {
strstr("aba","b");
}
However, some program might legally do this (see D.5 of ISO C++):
#include <string.h>
#include <cstring>
using namespace std;
void f() {
strstr("aba","b");
}
Unfortunately, your approach breaks in this case. However, you do get
us farther to a solution. Thus, I am happy your patch was applied.
Regards,
Loren