A
asit
Are warnings equally dangerous like errors ????
What is the difference between errors and warnings ??
What is the difference between errors and warnings ??
Sometimes yes, sometimes even more dangerrous, sometimes less. Make sure youasit said:Are warnings equally dangerous like errors ????
Usualla errors prevent the compiler to finish it's work, while with warningWhat is the difference between errors and warnings ??
Are warnings equally dangerous like errors ????
What is the difference between errors and warnings ??
Are warnings equally dangerous like errors ????
What is the difference between errors and warnings ??
(Note that this is an implementation detail; the C language only
requires "diagnostics", and doesn't distinguish between errors and
warnings.)
Are warnings equally dangerous like errors ????
What is the difference between errors and warnings ??
From your other article I gather that you a) use GCC abd b) are pretty newJoachim said:Sometimes yes, sometimes even more dangerrous, sometimes less. Make
sure you understand what the warning tries to tell you
Usualla errors prevent the compiler to finish it's work, while with
warning that (usually) doesn't happen
(e-mail address removed) wrote:
...
However, I've found that it's commonplace for mandatory diagnostics to
be reported as errors, while other diagnostics tend to be labeled as
warnings.
Are warnings equally dangerous like errors ????
What is the difference between errors and warnings ??
From your other article I gather that you a) use GCC abd b) are pretty new
to C
, so here's an extra hint:
uase gcc's option -Wall -Werror. While -Wall givesa a pretty complete set of
warnings (not all possible ones, but a reasonable subset) -Werror causes
them to be treated as errors (and hence the gcc refuses to compile the
code).
In this group you may also consider using -ansi -pedantic, to get extra
warnings for everything beond the C-Standard.
And as said earlier: only warning you fully understand may get ignored, so
better don't ignore any, but rewrite your code instead.
Well, I meant warning about things that are non-standardFlash said:Joachim Schmitz wrote, On 14/01/08 15:18:
I think you meant using -ansi -pedantic to get all the diagnostics
*required* by the C standard. It is -Wall and -Wextra that give you
warnings beyond those required by the C standard.
IndeedPlease note that you have to understand the warning *before* fixing
your code. For example adding a cast because that looks like what the
warning is suggesting is almost always the wrong thing to do.
Well, I meant warning about things that are non-standard
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.