P
prasanna
i will be very thankful if you sent all the errors and warnings regarding
to the language C
thank you
to the language C
thank you
prasanna said:i will be very thankful if you sent all the errors and warnings regarding
to the language C
thank you
prasanna said:i will be very thankful if you sent all the errors and warnings regarding
to the language C
prasanna said:i will be very thankful if you sent all the errors and warnings regarding
to the language C
In said:i will be very thankful if you sent all the errors and warnings regarding
to the language C
Mike said:The language standard requires an implementation to issue
a diagnostic message for certain language rule violations.
The actual text of such messages is not specified. I.e.
every message could be simply e.g. "ERROR!". "Warnings" are
not required at all. Most implementations do provide somewhat
meaninful warnings and errors, and each will have their own.
Consult your documentation.
Can a compiler "make up" its own warnings? Could a conforming compiler
issue a warning if the definition of main() didn't start on an odd-numbered
line, or if you used the "wrong" method of placing braces?
$ yuckycc -c foo.c
foo.c:8 Warning! Definition of main() should be on an odd-numbered line.
foo.c:10 Warning! I don't like variables named "j".
foo.c:12 Warning! Braces belong indented below the if() line.
foo.c:297 Warning! Length of source file exceeds the day of the year.
Kenneth said:Can a compiler "make up" its own warnings? Could a conforming compiler
issue a warning if the definition of main() didn't start on an odd-numbered
line, or if you used the "wrong" method of placing braces?
$ yuckycc -c foo.c
foo.c:8 Warning! Definition of main() should be on an odd-numbered line.
foo.c:10 Warning! I don't like variables named "j".
foo.c:12 Warning! Braces belong indented below the if() line.
foo.c:297 Warning! Length of source file exceeds the day of the year.
Can a compiler "make up" its own warnings?
Could a conforming compiler
issue a warning if the definition of main() didn't start on an odd-numbered
line, or if you used the "wrong" method of placing braces?
$ yuckycc -c foo.c
foo.c:8 Warning! Definition of main() should be on an odd-numbered line.
foo.c:10 Warning! I don't like variables named "j".
foo.c:12 Warning! Braces belong indented below the if() line.
foo.c:297 Warning! Length of source file exceeds the day of the year.
Can a compiler "make up" its own warnings? Could a conforming compiler
issue a warning if the definition of main() didn't start on an odd-numbered
line, or if you used the "wrong" method of placing braces?
$ yuckycc -c foo.c
Dan Pop said:So, the minimal requirements imposed by the language are trivially met
by a compiler displaying a copyright message for each and every
translation unit processed, whether it is perfectly correct or not.
S.Tobias said:Dan Pop said:So, the minimal requirements imposed by the language are trivially met
by a compiler displaying a copyright message for each and every
translation unit processed, whether it is perfectly correct or not.
I don't see it. Footnote 8 to chapter 5.1.1.3 (Diagnostics)
says: "The intent is that an implementation should identify the
nature of, and where possible localize, each violation. [...]".
Copyright message definitely doesn't satisfy above intent.
^^^^^^^^^^^^^^^^^^^^^^^^^In said:However, if the program is correct the implementation must
accept and attempt to execute it, no matter how many warnings
or other diagnostics it has issued.
In said:Dan Pop said:So, the minimal requirements imposed by the language are trivially met
by a compiler displaying a copyright message for each and every
translation unit processed, whether it is perfectly correct or not.
I don't see it. Footnote 8 to chapter 5.1.1.3 (Diagnostics)
says: "The intent is that an implementation should identify the
nature of, and where possible localize, each violation. [...]".
Copyright message definitely doesn't satisfy above intent.
I think even if a compiler spat out all possible diagnostic messages
on each run, it still shouldn't count as diagnostic.
Dan Pop said:In said:So, the minimal requirements imposed by the language are trivially met
by a compiler displaying a copyright message for each and every
translation unit processed, whether it is perfectly correct or not.
I don't see it. Footnote 8 to chapter 5.1.1.3 (Diagnostics)
says: "The intent is that an implementation should identify the
nature of, and where possible localize, each violation. [...]".
Footnotes are not normative. What the normative text of the standard
actually says is:
[snipped relevant quotes from 3.10 and 5.1.1.3]
So, if the implementation documents that all its diagnostics have the
format:
(c) 2004 Foo & Bar Corp
it is explicitly meeting the requirements imposed by the *normative*
text of the standard.
I said:it is even not a message, because it does not convey
any information (if it appears on every compilation).
In said:So could printing an empty string, ie. printf(""), count as
diagnostic message?
Printing an empty string means not doing anything at all.
I think that the diagnostic message has to consist from at least one
printable character, so that the user can identify it.
S.Tobias said:Final note: The documentation cannot claim that mere running (starting)
the compiler program is a diagnostic, because the Standard requires some
activity on the part of the compiler ("implementation shall produce");
starting the compiler is performed by the user (or OS on the low level).
For the same reason the sun-rise cannot constitute a diagnostic, unless
you find a philosopher that can prove that sun-rise is caused by running
the compiler program (both are in near time-space distance, so it might
be not impossible; another possibility could be to officially include
all sun-rises as part of a translation).
Keith Thompson said:The compiler could wait until the next local sunrise to produce its
output if it wants to issue a diagnostic, or produce output
immediately if it doesn't; then the sunrise could be considered a
diagnostic. (This is ambiguous if you happen to run the compiler at
sunrise, but the implementation is allowed to produce extraneous
diagnostics.)
<OT>I think you mean sed 's/[A-Z]//g'.</OT>
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.