Error-and-Warning-Options.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1999-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>The GNU Fortran Compiler: Error and Warning Options</title>
  20. <meta name="description" content="The GNU Fortran Compiler: Error and Warning Options">
  21. <meta name="keywords" content="The GNU Fortran Compiler: Error and Warning Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" rel="up" title="Invoking GNU Fortran">
  30. <link href="Debugging-Options.html#Debugging-Options" rel="next" title="Debugging Options">
  31. <link href="Preprocessing-Options.html#Preprocessing-Options" rel="prev" title="Preprocessing Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="Error-and-Warning-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Debugging-Options.html#Debugging-Options" accesskey="n" rel="next">Debugging Options</a>, Previous: <a href="Preprocessing-Options.html#Preprocessing-Options" accesskey="p" rel="prev">Preprocessing Options</a>, Up: <a href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" accesskey="u" rel="up">Invoking GNU Fortran</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="Options-to-request-or-suppress-errors-and-warnings"></a>
  69. <h3 class="section">2.4 Options to request or suppress errors and warnings</h3>
  70. <a name="index-options_002c-warnings"></a>
  71. <a name="index-options_002c-errors"></a>
  72. <a name="index-warnings_002c-suppressing"></a>
  73. <a name="index-messages_002c-error"></a>
  74. <a name="index-messages_002c-warning"></a>
  75. <a name="index-suppressing-warnings"></a>
  76. <p>Errors are diagnostic messages that report that the GNU Fortran compiler
  77. cannot compile the relevant piece of source code. The compiler will
  78. continue to process the program in an attempt to report further errors
  79. to aid in debugging, but will not produce any compiled output.
  80. </p>
  81. <p>Warnings are diagnostic messages that report constructions which
  82. are not inherently erroneous but which are risky or suggest there is
  83. likely to be a bug in the program. Unless <samp>-Werror</samp> is specified,
  84. they do not prevent compilation of the program.
  85. </p>
  86. <p>You can request many specific warnings with options beginning <samp>-W</samp>,
  87. for example <samp>-Wimplicit</samp> to request warnings on implicit
  88. declarations. Each of these specific warning options also has a
  89. negative form beginning <samp>-Wno-</samp> to turn off warnings;
  90. for example, <samp>-Wno-implicit</samp>. This manual lists only one of the
  91. two forms, whichever is not the default.
  92. </p>
  93. <p>These options control the amount and kinds of errors and warnings produced
  94. by GNU Fortran:
  95. </p>
  96. <dl compact="compact">
  97. <dt><code>-fmax-errors=<var>n</var></code></dt>
  98. <dd><a name="index-fmax_002derrors_003dn"></a>
  99. <a name="index-errors_002c-limiting"></a>
  100. <p>Limits the maximum number of error messages to <var>n</var>, at which point
  101. GNU Fortran bails out rather than attempting to continue processing the
  102. source code. If <var>n</var> is 0, there is no limit on the number of error
  103. messages produced.
  104. </p>
  105. </dd>
  106. <dt><code>-fsyntax-only</code></dt>
  107. <dd><a name="index-fsyntax_002donly"></a>
  108. <a name="index-syntax-checking"></a>
  109. <p>Check the code for syntax errors, but do not actually compile it. This
  110. will generate module files for each module present in the code, but no
  111. other output file.
  112. </p>
  113. </dd>
  114. <dt><code>-Wpedantic</code></dt>
  115. <dt><code>-pedantic</code></dt>
  116. <dd><a name="index-pedantic"></a>
  117. <a name="index-Wpedantic"></a>
  118. <p>Issue warnings for uses of extensions to Fortran 95.
  119. <samp>-pedantic</samp> also applies to C-language constructs where they
  120. occur in GNU Fortran source files, such as use of &lsquo;<samp>\e</samp>&rsquo; in a
  121. character constant within a directive like <code>#include</code>.
  122. </p>
  123. <p>Valid Fortran 95 programs should compile properly with or without
  124. this option.
  125. However, without this option, certain GNU extensions and traditional
  126. Fortran features are supported as well.
  127. With this option, many of them are rejected.
  128. </p>
  129. <p>Some users try to use <samp>-pedantic</samp> to check programs for conformance.
  130. They soon find that it does not do quite what they want&mdash;it finds some
  131. nonstandard practices, but not all.
  132. However, improvements to GNU Fortran in this area are welcome.
  133. </p>
  134. <p>This should be used in conjunction with <samp>-std=f95</samp>,
  135. <samp>-std=f2003</samp> or <samp>-std=f2008</samp>.
  136. </p>
  137. </dd>
  138. <dt><code>-pedantic-errors</code></dt>
  139. <dd><a name="index-pedantic_002derrors"></a>
  140. <p>Like <samp>-pedantic</samp>, except that errors are produced rather than
  141. warnings.
  142. </p>
  143. </dd>
  144. <dt><code>-Wall</code></dt>
  145. <dd><a name="index-Wall"></a>
  146. <a name="index-all-warnings"></a>
  147. <a name="index-warnings_002c-all"></a>
  148. <p>Enables commonly used warning options pertaining to usage that
  149. we recommend avoiding and that we believe are easy to avoid.
  150. This currently includes <samp>-Waliasing</samp>, <samp>-Wampersand</samp>,
  151. <samp>-Wconversion</samp>, <samp>-Wsurprising</samp>, <samp>-Wc-binding-type</samp>,
  152. <samp>-Wintrinsics-std</samp>, <samp>-Wtabs</samp>, <samp>-Wintrinsic-shadow</samp>,
  153. <samp>-Wline-truncation</samp>, <samp>-Wtarget-lifetime</samp>,
  154. <samp>-Winteger-division</samp>, <samp>-Wreal-q-constant</samp>, <samp>-Wunused</samp>
  155. and <samp>-Wundefined-do-loop</samp>.
  156. </p>
  157. </dd>
  158. <dt><code>-Waliasing</code></dt>
  159. <dd><a name="index-Waliasing"></a>
  160. <a name="index-aliasing"></a>
  161. <a name="index-warnings_002c-aliasing"></a>
  162. <p>Warn about possible aliasing of dummy arguments. Specifically, it warns
  163. if the same actual argument is associated with a dummy argument with
  164. <code>INTENT(IN)</code> and a dummy argument with <code>INTENT(OUT)</code> in a call
  165. with an explicit interface.
  166. </p>
  167. <p>The following example will trigger the warning.
  168. </p><div class="smallexample">
  169. <pre class="smallexample"> interface
  170. subroutine bar(a,b)
  171. integer, intent(in) :: a
  172. integer, intent(out) :: b
  173. end subroutine
  174. end interface
  175. integer :: a
  176. call bar(a,a)
  177. </pre></div>
  178. </dd>
  179. <dt><code>-Wampersand</code></dt>
  180. <dd><a name="index-Wampersand"></a>
  181. <a name="index-warnings_002c-ampersand"></a>
  182. <a name="index-_0026"></a>
  183. <p>Warn about missing ampersand in continued character constants. The warning is
  184. given with <samp>-Wampersand</samp>, <samp>-pedantic</samp>, <samp>-std=f95</samp>,
  185. <samp>-std=f2003</samp> and <samp>-std=f2008</samp>. Note: With no ampersand
  186. given in a continued character constant, GNU Fortran assumes continuation
  187. at the first non-comment, non-whitespace character after the ampersand
  188. that initiated the continuation.
  189. </p>
  190. </dd>
  191. <dt><code>-Wargument-mismatch</code></dt>
  192. <dd><a name="index-Wargument_002dmismatch"></a>
  193. <a name="index-warnings_002c-argument-mismatch"></a>
  194. <a name="index-warnings_002c-parameter-mismatch"></a>
  195. <a name="index-warnings_002c-interface-mismatch"></a>
  196. <p>Warn about type, rank, and other mismatches between formal parameters and actual
  197. arguments to functions and subroutines. These warnings are recommended and
  198. thus enabled by default.
  199. </p>
  200. </dd>
  201. <dt><code>-Warray-temporaries</code></dt>
  202. <dd><a name="index-Warray_002dtemporaries"></a>
  203. <a name="index-warnings_002c-array-temporaries"></a>
  204. <p>Warn about array temporaries generated by the compiler. The information
  205. generated by this warning is sometimes useful in optimization, in order to
  206. avoid such temporaries.
  207. </p>
  208. </dd>
  209. <dt><code>-Wc-binding-type</code></dt>
  210. <dd><a name="index-Wc_002dbinding_002dtype"></a>
  211. <a name="index-warning_002c-C-binding-type"></a>
  212. <p>Warn if the a variable might not be C interoperable. In particular, warn if
  213. the variable has been declared using an intrinsic type with default kind
  214. instead of using a kind parameter defined for C interoperability in the
  215. intrinsic <code>ISO_C_Binding</code> module. This option is implied by
  216. <samp>-Wall</samp>.
  217. </p>
  218. </dd>
  219. <dt><code>-Wcharacter-truncation</code></dt>
  220. <dd><a name="index-Wcharacter_002dtruncation"></a>
  221. <a name="index-warnings_002c-character-truncation"></a>
  222. <p>Warn when a character assignment will truncate the assigned string.
  223. </p>
  224. </dd>
  225. <dt><code>-Wline-truncation</code></dt>
  226. <dd><a name="index-Wline_002dtruncation"></a>
  227. <a name="index-warnings_002c-line-truncation"></a>
  228. <p>Warn when a source code line will be truncated. This option is
  229. implied by <samp>-Wall</samp>. For free-form source code, the default is
  230. <samp>-Werror=line-truncation</samp> such that truncations are reported as
  231. error.
  232. </p>
  233. </dd>
  234. <dt><code>-Wconversion</code></dt>
  235. <dd><a name="index-Wconversion"></a>
  236. <a name="index-warnings_002c-conversion"></a>
  237. <a name="index-conversion"></a>
  238. <p>Warn about implicit conversions that are likely to change the value of
  239. the expression after conversion. Implied by <samp>-Wall</samp>.
  240. </p>
  241. </dd>
  242. <dt><code>-Wconversion-extra</code></dt>
  243. <dd><a name="index-Wconversion_002dextra"></a>
  244. <a name="index-warnings_002c-conversion-1"></a>
  245. <a name="index-conversion-1"></a>
  246. <p>Warn about implicit conversions between different types and kinds. This
  247. option does <em>not</em> imply <samp>-Wconversion</samp>.
  248. </p>
  249. </dd>
  250. <dt><code>-Wextra</code></dt>
  251. <dd><a name="index-Wextra"></a>
  252. <a name="index-extra-warnings"></a>
  253. <a name="index-warnings_002c-extra"></a>
  254. <p>Enables some warning options for usages of language features which
  255. may be problematic. This currently includes <samp>-Wcompare-reals</samp>
  256. and <samp>-Wunused-parameter</samp>.
  257. </p>
  258. </dd>
  259. <dt><code>-Wimplicit-interface</code></dt>
  260. <dd><a name="index-Wimplicit_002dinterface"></a>
  261. <a name="index-warnings_002c-implicit-interface"></a>
  262. <p>Warn if a procedure is called without an explicit interface.
  263. Note this only checks that an explicit interface is present. It does not
  264. check that the declared interfaces are consistent across program units.
  265. </p>
  266. </dd>
  267. <dt><code>-Wimplicit-procedure</code></dt>
  268. <dd><a name="index-Wimplicit_002dprocedure"></a>
  269. <a name="index-warnings_002c-implicit-procedure"></a>
  270. <p>Warn if a procedure is called that has neither an explicit interface
  271. nor has been declared as <code>EXTERNAL</code>.
  272. </p>
  273. </dd>
  274. <dt><code>-Winteger-division</code></dt>
  275. <dd><a name="index-Winteger_002ddivision"></a>
  276. <a name="index-warnings_002c-integer-division"></a>
  277. <a name="index-warnings_002c-division-of-integers"></a>
  278. <p>Warn if a constant integer division truncates it result.
  279. As an example, 3/5 evaluates to 0.
  280. </p>
  281. </dd>
  282. <dt><code>-Wintrinsics-std</code></dt>
  283. <dd><a name="index-Wintrinsics_002dstd"></a>
  284. <a name="index-warnings_002c-non_002dstandard-intrinsics"></a>
  285. <a name="index-warnings_002c-intrinsics-of-other-standards"></a>
  286. <p>Warn if <code>gfortran</code> finds a procedure named like an intrinsic not
  287. available in the currently selected standard (with <samp>-std</samp>) and treats
  288. it as <code>EXTERNAL</code> procedure because of this. <samp>-fall-intrinsics</samp> can
  289. be used to never trigger this behavior and always link to the intrinsic
  290. regardless of the selected standard.
  291. </p>
  292. </dd>
  293. <dt><code>-Wreal-q-constant</code></dt>
  294. <dd><a name="index-Wreal_002dq_002dconstant"></a>
  295. <a name="index-warnings_002c-q-exponent_002dletter"></a>
  296. <p>Produce a warning if a real-literal-constant contains a <code>q</code>
  297. exponent-letter.
  298. </p>
  299. </dd>
  300. <dt><code>-Wsurprising</code></dt>
  301. <dd><a name="index-Wsurprising"></a>
  302. <a name="index-warnings_002c-suspicious-code"></a>
  303. <p>Produce a warning when &ldquo;suspicious&rdquo; code constructs are encountered.
  304. While technically legal these usually indicate that an error has been made.
  305. </p>
  306. <p>This currently produces a warning under the following circumstances:
  307. </p>
  308. <ul>
  309. <li> An INTEGER SELECT construct has a CASE that can never be matched as its
  310. lower value is greater than its upper value.
  311. </li><li> A LOGICAL SELECT construct has three CASE statements.
  312. </li><li> A TRANSFER specifies a source that is shorter than the destination.
  313. </li><li> The type of a function result is declared more than once with the same type. If
  314. <samp>-pedantic</samp> or standard-conforming mode is enabled, this is an error.
  315. </li><li> A <code>CHARACTER</code> variable is declared with negative length.
  316. </li></ul>
  317. </dd>
  318. <dt><code>-Wtabs</code></dt>
  319. <dd><a name="index-Wtabs"></a>
  320. <a name="index-warnings_002c-tabs"></a>
  321. <a name="index-tabulators"></a>
  322. <p>By default, tabs are accepted as whitespace, but tabs are not members
  323. of the Fortran Character Set. For continuation lines, a tab followed
  324. by a digit between 1 and 9 is supported. <samp>-Wtabs</samp> will cause
  325. a warning to be issued if a tab is encountered. Note, <samp>-Wtabs</samp>
  326. is active for <samp>-pedantic</samp>, <samp>-std=f95</samp>, <samp>-std=f2003</samp>,
  327. <samp>-std=f2008</samp>, <samp>-std=f2008ts</samp> and <samp>-Wall</samp>.
  328. </p>
  329. </dd>
  330. <dt><code>-Wundefined-do-loop</code></dt>
  331. <dd><a name="index-Wundefined_002ddo_002dloop"></a>
  332. <a name="index-warnings_002c-undefined-do-loop"></a>
  333. <p>Warn if a DO loop with step either 1 or -1 yields an underflow or an overflow
  334. during iteration of an induction variable of the loop.
  335. This option is implied by <samp>-Wall</samp>.
  336. </p>
  337. </dd>
  338. <dt><code>-Wunderflow</code></dt>
  339. <dd><a name="index-Wunderflow"></a>
  340. <a name="index-warnings_002c-underflow"></a>
  341. <a name="index-underflow"></a>
  342. <p>Produce a warning when numerical constant expressions are
  343. encountered, which yield an UNDERFLOW during compilation. Enabled by default.
  344. </p>
  345. </dd>
  346. <dt><code>-Wintrinsic-shadow</code></dt>
  347. <dd><a name="index-Wintrinsic_002dshadow"></a>
  348. <a name="index-warnings_002c-intrinsic"></a>
  349. <a name="index-intrinsic"></a>
  350. <p>Warn if a user-defined procedure or module procedure has the same name as an
  351. intrinsic; in this case, an explicit interface or <code>EXTERNAL</code> or
  352. <code>INTRINSIC</code> declaration might be needed to get calls later resolved to
  353. the desired intrinsic/procedure. This option is implied by <samp>-Wall</samp>.
  354. </p>
  355. </dd>
  356. <dt><code>-Wuse-without-only</code></dt>
  357. <dd><a name="index-Wuse_002dwithout_002donly"></a>
  358. <a name="index-warnings_002c-use-statements"></a>
  359. <a name="index-intrinsic-1"></a>
  360. <p>Warn if a <code>USE</code> statement has no <code>ONLY</code> qualifier and
  361. thus implicitly imports all public entities of the used module.
  362. </p>
  363. </dd>
  364. <dt><code>-Wunused-dummy-argument</code></dt>
  365. <dd><a name="index-Wunused_002ddummy_002dargument"></a>
  366. <a name="index-warnings_002c-unused-dummy-argument"></a>
  367. <a name="index-unused-dummy-argument"></a>
  368. <a name="index-dummy-argument_002c-unused"></a>
  369. <p>Warn about unused dummy arguments. This option is implied by <samp>-Wall</samp>.
  370. </p>
  371. </dd>
  372. <dt><code>-Wunused-parameter</code></dt>
  373. <dd><a name="index-Wunused_002dparameter"></a>
  374. <a name="index-warnings_002c-unused-parameter"></a>
  375. <a name="index-unused-parameter"></a>
  376. <p>Contrary to <code>gcc</code>&rsquo;s meaning of <samp>-Wunused-parameter</samp>,
  377. <code>gfortran</code>&rsquo;s implementation of this option does not warn
  378. about unused dummy arguments (see <samp>-Wunused-dummy-argument</samp>),
  379. but about unused <code>PARAMETER</code> values. <samp>-Wunused-parameter</samp>
  380. is implied by <samp>-Wextra</samp> if also <samp>-Wunused</samp> or
  381. <samp>-Wall</samp> is used.
  382. </p>
  383. </dd>
  384. <dt><code>-Walign-commons</code></dt>
  385. <dd><a name="index-Walign_002dcommons"></a>
  386. <a name="index-warnings_002c-alignment-of-COMMON-blocks"></a>
  387. <a name="index-alignment-of-COMMON-blocks"></a>
  388. <p>By default, <code>gfortran</code> warns about any occasion of variables being
  389. padded for proper alignment inside a <code>COMMON</code> block. This warning can be turned
  390. off via <samp>-Wno-align-commons</samp>. See also <samp>-falign-commons</samp>.
  391. </p>
  392. </dd>
  393. <dt><code>-Wfunction-elimination</code></dt>
  394. <dd><a name="index-Wfunction_002delimination"></a>
  395. <a name="index-function-elimination"></a>
  396. <a name="index-warnings_002c-function-elimination"></a>
  397. <p>Warn if any calls to functions are eliminated by the optimizations
  398. enabled by the <samp>-ffrontend-optimize</samp> option.
  399. </p>
  400. </dd>
  401. <dt><code>-Wrealloc-lhs</code></dt>
  402. <dd><a name="index-Wrealloc_002dlhs"></a>
  403. <a name="index-Reallocate-the-LHS-in-assignments_002c-notification"></a>
  404. <p>Warn when the compiler might insert code to for allocation or reallocation of
  405. an allocatable array variable of intrinsic type in intrinsic assignments. In
  406. hot loops, the Fortran 2003 reallocation feature may reduce the performance.
  407. If the array is already allocated with the correct shape, consider using a
  408. whole-array array-spec (e.g. <code>(:,:,:)</code>) for the variable on the left-hand
  409. side to prevent the reallocation check. Note that in some cases the warning
  410. is shown, even if the compiler will optimize reallocation checks away. For
  411. instance, when the right-hand side contains the same variable multiplied by
  412. a scalar. See also <samp>-frealloc-lhs</samp>.
  413. </p>
  414. </dd>
  415. <dt><code>-Wrealloc-lhs-all</code></dt>
  416. <dd><a name="index-Wrealloc_002dlhs_002dall"></a>
  417. <p>Warn when the compiler inserts code to for allocation or reallocation of an
  418. allocatable variable; this includes scalars and derived types.
  419. </p>
  420. </dd>
  421. <dt><code>-Wcompare-reals</code></dt>
  422. <dd><a name="index-Wcompare_002dreals"></a>
  423. <p>Warn when comparing real or complex types for equality or inequality.
  424. This option is implied by <samp>-Wextra</samp>.
  425. </p>
  426. </dd>
  427. <dt><code>-Wtarget-lifetime</code></dt>
  428. <dd><a name="index-Wtargt_002dlifetime"></a>
  429. <p>Warn if the pointer in a pointer assignment might be longer than the its
  430. target. This option is implied by <samp>-Wall</samp>.
  431. </p>
  432. </dd>
  433. <dt><code>-Wzerotrip</code></dt>
  434. <dd><a name="index-Wzerotrip"></a>
  435. <p>Warn if a <code>DO</code> loop is known to execute zero times at compile
  436. time. This option is implied by <samp>-Wall</samp>.
  437. </p>
  438. </dd>
  439. <dt><code>-Werror</code></dt>
  440. <dd><a name="index-Werror"></a>
  441. <a name="index-warnings_002c-to-errors"></a>
  442. <p>Turns all warnings into errors.
  443. </p></dd>
  444. </dl>
  445. <p>See <a href="http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options">Options to Request or Suppress Errors and
  446. Warnings</a> in <cite>Using the GNU Compiler Collection (GCC)</cite>, for information on
  447. more options offered by the GBE shared by <code>gfortran</code>, <code>gcc</code>
  448. and other GNU compilers.
  449. </p>
  450. <p>Some of these have no effect when compiling programs written in Fortran.
  451. </p>
  452. <hr>
  453. <div class="header">
  454. <p>
  455. Next: <a href="Debugging-Options.html#Debugging-Options" accesskey="n" rel="next">Debugging Options</a>, Previous: <a href="Preprocessing-Options.html#Preprocessing-Options" accesskey="p" rel="prev">Preprocessing Options</a>, Up: <a href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" accesskey="u" rel="up">Invoking GNU Fortran</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  456. </div>
  457. </body>
  458. </html>