Re: How to test whether strstr() returns a null pointer or not?
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Sun, 05 Jun 2005 21:36:26 GMT
Malcolm wrote:
> "Keith Thompson" <kst-u@xxxxxxx> wrote
talking about "if(NULL != strstr(str1,str2))" failing.
>>
>>> A window popped up asking for permission to report the problem to
>>> Microsoft. That's how I knew something was wrong. Anyway, since
>>> the program is working now, I'll just leave the mistery behind and
>>> forget about it.
>>
>> It's very likely that the error was a symptom of a deeper problem
>> that's going to bite you again later on. The change you made
>> should not have made any difference. It's up to you whether you
>> want to spend time tracking it down, but I'd advise doing so.
>>
> The bug is in the compiler. That's why MS want a bug report.
>
> The thing to do (easier said than done) is to run the code through
> another compiler to see if everything is correct. If you are stuck
> with a bad compiler, there's nothing much you can do, except look
> at unusual constructs to see what is causing it to misbehave, or
> what the OP is doing, which is to play with the code and hope the
> problem goes away.
Please don't snip attributions for material you quote.
Assuming the author hasn't done some thing exorbitantly stupid,
such as redefining NULL, it seems we have the usual Microsloth
quality. If they can't correctly parse such a simple statement,
there must be no regression suite of tests in existance.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
.
- Follow-Ups:
- References:
- How to test whether strstr() returns a null pointer or not?
- From: John Smith
- Re: How to test whether strstr() returns a null pointer or not?
- From: Barry Schwarz
- Re: How to test whether strstr() returns a null pointer or not?
- From: John Smith
- Re: How to test whether strstr() returns a null pointer or not?
- From: Barry Schwarz
- Re: How to test whether strstr() returns a null pointer or not?
- From: John Smith
- Re: How to test whether strstr() returns a null pointer or not?
- From: Keith Thompson
- Re: How to test whether strstr() returns a null pointer or not?
- From: Malcolm
- How to test whether strstr() returns a null pointer or not?
- Prev by Date: Re: Why compiler not generating any warning ?
- Next by Date: Re: Robustify code dealing with input
- Previous by thread: Re: How to test whether strstr() returns a null pointer or not?
- Next by thread: Re: How to test whether strstr() returns a null pointer or not?
- Index(es):
Relevant Pages
|