473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

diagnostic message

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.

Jul 31 '08 #1
5 1650
santosh said:
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?
Yes.
I don't think they
follow the letter of the Standard in this regard.
Borland does. Microsoft does. And how about gcc? Well, kind of:
"Diagnostics consist of all the output sent to stderr by GCC." :-)

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jul 31 '08 #2
Richard Heathfield wrote:
santosh said:
>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?

Yes.
>I don't think they
follow the letter of the Standard in this regard.

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

Jul 31 '08 #3

"santosh" <sa*********@gmail.comwrote in message
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. :-)
gcc *.c dumpnon-diagnostics.out

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Jul 31 '08 #4
santosh said:
Richard Heathfield wrote:
>santosh said:
>>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?

Yes.
>>I don't think they
follow the letter of the Standard in this regard.

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?
Borland certainly does. I can't lay my hands on my MS documentation right
now (I haven't even /seen/ it in some years, even though it comes in about
917 volumes), so I was speaking from memory there.
Or do they take the easy way out and define the entire set of messages
as diagnostic messages?
MS might take that easy way out, but I doubt it. (No doubt someone with a
tidier study than mine will be able to clarify.)
>
>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. :-)
On a typical gcc-friendly system (e.g. Linux) it's easy enough to separate
them.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jul 31 '08 #5
santosh wrote, On 31/07/08 20:01:
Richard Heathfield wrote:
>santosh said:
>>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?
Yes.
>>I don't think they
follow the letter of the Standard in this regard.
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?
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.
>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. :-)
Well, if you choose to deliberately throw away information gcc provides :-)
--
Flash Gordon
Jul 31 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: KiwiBrian | last post by:
I have a snippet of a few CSS rules that I insert in a page as a diagnostic tool It places borders around specified tags. However I have been unable to get it to display borders on table rows. Is...
2
by: Christopher Benson-Manica | last post by:
Is a conforming C++ implementation required to issue a diagnostic when invoked on the following code? #include <cstdlib> #include <iostream> #include <string> int main() { printf( "Hello,...
2
by: adish11 | last post by:
I'm using Web Application and want to execute an MSDOS executable with some parameters like this example: software.exe -i -x How do I use System.Diagnostic.Process to execute this .exe with...
5
by: Michael Johnson Sr. | last post by:
I am starting and stopping a process using System.Diagnostic.Process. aspnet_wp is running as system rather than machine (as per machine.config modification). When the process gets started, it...
4
by: Andrew | last post by:
Ive created a web app. which has a web.config file that automatically creates a text listener file for my Application trace. Over time this file will grow and I want to understand how best to...
8
by: Man with Oscilloscope | last post by:
goto jumping over vla -- diagnostic required? This is a question about C99, 6.8.6.1, example 2 (see test below). I'm currently working on updating an older compiler up to C99. The standard is...
3
by: Simon Verona | last post by:
I have a problem with my application crashing on-site.. (It just disappears with no errors!). I suspect that I am running out of some sort of resource during the time that the application is...
41
by: p_cricket_guy | last post by:
Please see this test program: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <limits.h> 4 5 int main (void) 6 { 7 int y = -2147483648; 8 int x = INT_MIN;
11
by: Old Wolf | last post by:
Does the following program require a diagnostic? Which section of the Standard deals with this? (I read the section on function calls and didn't see anything). void f(void); int main(void) {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.