423,335 Members | 1,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,335 IT Pros & Developers. It's quick & easy.

what is the difference between a compiler error & a warning

P: 1
in c program what is the difference between a compiler error and a warning
Jun 8 '13 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,163
A compiler error means your code has a syntax error that causes the compiler to give up. No program is generated. You must fix the error.

A compiler warning means the compiler suspects your program might crash or behave strangely but the syntax is correct. The warning suggests you rework the code to make the warning go away.

BTW it is common practice in software companies to have the compiler flag all warnings as errors before the software is released. Well written programs have no errors and no warnings when they compile and link.
Jun 8 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.