How to test whether strstr() returns a null pointer or not?

F

Flash Gordon

Keith said:
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.)

<OT>
For the record, and from personal experience, I can state categorically
that it can be triggered by a bug in a program. I know this because I
have had it from code written using Delphi and found that the problem
really was a problem in the code I had compiled.
If it's the result of undefined behavior in the program, recompiling
with another compiler coud very well *seem* to correct the problem.

In fact, I would use this as an indication that the program almost
certainly invokes undefined behaviour rather than thinking it means a
compiler bug. I *have* found compiler bugs, but not anywhere near as
often as I've found bugs in the code being compiled.
 
M

Mark

Flash Gordon said:
<OT>
For the record, and from personal experience, I can state categorically
that it can be triggered by a bug in a program. I know this because I have
had it from code written using Delphi and found that the problem really
was a problem in the code I had compiled.
</OT>

When did this become an 'html' group?

#ifdef off_topic_permitted

The 'report the problem to Microsoft' message may pop up whenever
an application crashes (dependant on how you set up windows)

In XP - system properties -> advanced tab -> error reporting button.

Has absolutely NOTHING to do with the compiler... unless it's the
compiler that crashed which caused the message!

#endif
 
K

Keith Thompson

Mark said:
When did this become an 'html' group?

It isn't; there is no "OT" tag in HTML. (Yeah, I'm taking the joke
too seriously.)
#ifdef off_topic_permitted

The 'report the problem to Microsoft' message may pop up whenever
an application crashes (dependant on how you set up windows)

In XP - system properties -> advanced tab -> error reporting button.

Has absolutely NOTHING to do with the compiler... unless it's the
compiler that crashed which caused the message!

#endif

Or unless it was a bug in the compiler that caused the application to
crash.
 
C

Christopher Benson-Manica

Keith Thompson said:
It isn't; there is no "OT" tag in HTML. (Yeah, I'm taking the joke
too seriously.)

It is XML, however...
Or unless it was a bug in the compiler that caused the application to
crash.

FWIW, in my experience this is not as unlikely as one might suppose.
We use a two-version old Borland suite, and we've learned that certain
operations are likely to trigger fatal compiler bugs...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,129
Latest member
FastBurnketo
Top