summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/warnings-and-errors.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/gcc~13/warnings-and-errors.html')
-rw-r--r--devdocs/gcc~13/warnings-and-errors.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/devdocs/gcc~13/warnings-and-errors.html b/devdocs/gcc~13/warnings-and-errors.html
new file mode 100644
index 00000000..84b1c292
--- /dev/null
+++ b/devdocs/gcc~13/warnings-and-errors.html
@@ -0,0 +1,10 @@
+<div class="section-level-extent" id="Warnings-and-Errors"> <div class="nav-panel"> <p> Previous: <a href="non-bugs" accesskey="p" rel="prev">Certain Changes We Don’t Want to Make</a>, Up: <a href="trouble" accesskey="u" rel="up">Known Causes of Trouble with GCC</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="section" id="Warning-Messages-and-Error-Messages"><span>14.9 Warning Messages and Error Messages<a class="copiable-link" href="#Warning-Messages-and-Error-Messages"> ¶</a></span></h1> <p>The GNU compiler can produce two kinds of diagnostics: errors and warnings. Each kind has a different purpose: </p> <ul class="itemize mark-none"> <li>
+<em class="dfn">Errors</em> report problems that make it impossible to compile your program. GCC reports errors with the source file name and line number where the problem is apparent. </li>
+<li>
+<em class="dfn">Warnings</em> report other unusual conditions in your code that <em class="emph">may</em> indicate a problem, although compilation can (and does) proceed. Warning messages also report the source file name and line number, but include the text ‘<samp class="samp">warning:</samp>’ to distinguish them from error messages. </li>
+</ul> <p>Warnings may indicate danger points where you should check to make sure that your program really does what you intend; or the use of obsolete features; or the use of nonstandard features of GNU C or C++. Many warnings are issued only if you ask for them, with one of the <samp class="option">-W</samp> options (for instance, <samp class="option">-Wall</samp> requests a variety of useful warnings). </p> <p>GCC always tries to compile your program if possible; it never gratuitously rejects a program whose meaning is clear merely because (for instance) it fails to conform to a standard. In some cases, however, the C and C++ standards specify that certain extensions are forbidden, and a diagnostic <em class="emph">must</em> be issued by a conforming compiler. The <samp class="option">-pedantic</samp> option tells GCC to issue warnings in such cases; <samp class="option">-pedantic-errors</samp> says to make them errors instead. This does not mean that <em class="emph">all</em> non-ISO constructs get warnings or errors. </p> <p>See <a class="xref" href="warning-options">Options to Request or Suppress Warnings</a>, for more detail on these and related command-line options. </p> </div> <div class="nav-panel"> <p> Previous: <a href="non-bugs">Certain Changes We Don’t Want to Make</a>, Up: <a href="trouble">Known Causes of Trouble with GCC</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br>
+ <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warnings-and-Errors.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warnings-and-Errors.html</a>
+ </p>
+</div>