diagnostic message

S

santosh

We are given the definition of a "diagnostic message" in 3.10 of the
Standard. To quote:

3.10
1 diagnostic message
message belonging to an implementation-defined subset of the
implementation's message output

Unless I'm mistaken, (which I probably am), the definition clearly
implies that each conforming implementation must clearly distinguish
diagnostic messages from their total set of messages, and moreover
document this.

Do existing major implementations actually do this? I don't think they
follow the letter of the Standard in this regard.
 
S

santosh

Richard said:
santosh said:


Borland does. Microsoft does.

But do they also document the subset of their messages that are
diagnostic messages and the means to identify them from "ordinary"
messages?

Or do they take the easy way out and define the entire set of messages
as diagnostic messages?
And how about gcc? Well, kind of:
"Diagnostics consist of all the output sent to stderr by GCC." :)

Then presumably there is no obvious way to distinguish between
diagnostic and other messages if stderr and stdout of gcc happen to
write to the same device or file. :)
 
F

Flash Gordon

santosh wrote, On 31/07/08 20:01:
But do they also document the subset of their messages that are
diagnostic messages and the means to identify them from "ordinary"
messages?

The diagnostic messages are the ones you still get if you disable a
other warnings :)

Alternatively, you could probably use -fdiagnostics-show-option which
will tell you the option that caused the diagnostic to be produced, then
it should be all errors/warnings for which no option was required +
those caused by the conformance options (-ansi, -stdc=, -pedantic)
Or do they take the easy way out and define the entire set of messages
as diagnostic messages?

That is answered by the paragraph below.
Then presumably there is no obvious way to distinguish between
diagnostic and other messages if stderr and stdout of gcc happen to
write to the same device or file. :)

Well, if you choose to deliberately throw away information gcc provides :)
 

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

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,202
Latest member
MikoOslo

Latest Threads

Top