Info about Errors ,warnings..!

Discussion in 'C Programming' started by Rajshekhar, Jun 14, 2005.

  1. Rajshekhar

    Rajshekhar Guest

    Hi all,
    Where can i get the complete details about the all types of errors and
    warnings that a C-compiler pops up..??

    any pdfs or links or books to refer....!
    plz help me out..

    Regards,
    Rajshekhar
     
    Rajshekhar, Jun 14, 2005
    #1
    1. Advertisements

  2. Rajshekhar

    Zoran Cutura Guest

    Most likely you'll find these in the manuals of the compiler in use.
    There are to many to actually write one documentation that fits all.
    Most compilers have specific newsgroups where you might get help.
     
    Zoran Cutura, Jun 14, 2005
    #2
    1. Advertisements

  3. Rajshekhar

    Richard Bos Guest

    The manual that came with your compiler. A compiler may warn about
    anything; there are a couple of problems that it must warn about, but it
    need not stop after producing the warning and the Standard doesn't make
    any demands about the contents of the warning. This is a valid message:
    "File draw.c, line 14: Good grief, your code is ugly!"
    and so is this, even as the only message the compiler ever produces of
    its own accord:
    "Error detected. Terminating compile."
    In neither case is the compiler required not to compile anything, not
    even in the latter case. Of course, a compiler that _claimed_ to abort
    the compile, and then continued to write a program, is of very bad
    quality; but the Standard, at least, doesn't forbid it.
    Since the problems (or even non-problems) compilers warn about _may_
    vary so widely, they do indeed vary. There is, therefore, no one list of
    all messages a compiler may produce, nor for which of these it might
    halt compilation. There should, however, (as a QOI issue; this is TTBOMK
    not required by the Standard, either) be one for your compiler, and it
    should have come with that compiler's documentation.

    There is only one exception to this, and it is an explicit request by
    the programmer: #error <message>. This _must_ produce an error message
    that includes the message, and it is not allowed to succesfully compile.
    Even there, all the Standard requires is that the message includes
    <message>. It may vary from
    <message>
    (as the only message produced by that compile), to
    <a whole bucketload of other warnings>
    "Oh, btw, you asked for " <message>
    <another bucketload of warnings>

    Richard
     
    Richard Bos, Jun 14, 2005
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.