Re: How to test whether strstr() returns a null pointer or not?
"Malcolm" <regniztar@btin ternet.com> writes:[color=blue]
> "Keith Thompson" <kst-u@mib.org> wrote[color=green][color=darkred]
>>> 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.[/color]
>>
>> 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.
>>[/color]
> The bug is in the compiler. That's why MS want a bug report.[/color]
Is it? Does the "report the problem to Microsoft" message reliably
indicate a bug in Microsoft's compiler, or could it be triggered by a
bug in the program itself? (I have no idea what the answer to that
question is.)
[color=blue]
> 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.[/color]
If it's the result of undefined behavior in the program, recompiling
with another compiler coud very well *seem* to correct the problem.
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
"Malcolm" <regniztar@btin ternet.com> writes:[color=blue]
> "Keith Thompson" <kst-u@mib.org> wrote[color=green][color=darkred]
>>> 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.[/color]
>>
>> 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.
>>[/color]
> The bug is in the compiler. That's why MS want a bug report.[/color]
Is it? Does the "report the problem to Microsoft" message reliably
indicate a bug in Microsoft's compiler, or could it be triggered by a
bug in the program itself? (I have no idea what the answer to that
question is.)
[color=blue]
> 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.[/color]
If it's the result of undefined behavior in the program, recompiling
with another compiler coud very well *seem* to correct the problem.
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Comment