1<html lang="en"> 2<head> 3<title>Language Independent Options - Using the GNU Compiler Collection (GCC)</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using the GNU Compiler Collection (GCC)"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC"> 9<link rel="prev" href="Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html#Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options" title="Objective-C and Objective-C++ Dialect Options"> 10<link rel="next" href="Warning-Options.html#Warning-Options" title="Warning Options"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 152010 Free Software Foundation, Inc. 16 17Permission is granted to copy, distribute and/or modify this document 18under the terms of the GNU Free Documentation License, Version 1.3 or 19any later version published by the Free Software Foundation; with the 20Invariant Sections being ``Funding Free Software'', the Front-Cover 21Texts being (a) (see below), and with the Back-Cover Texts being (b) 22(see below). A copy of the license is included in the section entitled 23``GNU Free Documentation License''. 24 25(a) The FSF's Front-Cover Text is: 26 27 A GNU Manual 28 29(b) The FSF's Back-Cover Text is: 30 31 You have freedom to copy and modify this GNU Manual, like GNU 32 software. Copies published by the Free Software Foundation raise 33 funds for GNU development.--> 34<meta http-equiv="Content-Style-Type" content="text/css"> 35<style type="text/css"><!-- 36 pre.display { font-family:inherit } 37 pre.format { font-family:inherit } 38 pre.smalldisplay { font-family:inherit; font-size:smaller } 39 pre.smallformat { font-family:inherit; font-size:smaller } 40 pre.smallexample { font-size:smaller } 41 pre.smalllisp { font-size:smaller } 42 span.sc { font-variant:small-caps } 43 span.roman { font-family:serif; font-weight:normal; } 44 span.sansserif { font-family:sans-serif; font-weight:normal; } 45--></style> 46<link rel="stylesheet" type="text/css" href="../cs.css"> 47</head> 48<body> 49<div class="node"> 50<a name="Language-Independent-Options"></a> 51<p> 52Next: <a rel="next" accesskey="n" href="Warning-Options.html#Warning-Options">Warning Options</a>, 53Previous: <a rel="previous" accesskey="p" href="Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html#Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options">Objective-C and Objective-C++ Dialect Options</a>, 54Up: <a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a> 55<hr> 56</div> 57 58<h3 class="section">3.7 Options to Control Diagnostic Messages Formatting</h3> 59 60<p><a name="index-options-to-control-diagnostics-formatting-222"></a><a name="index-diagnostic-messages-223"></a><a name="index-message-formatting-224"></a> 61Traditionally, diagnostic messages have been formatted irrespective of 62the output device's aspect (e.g. its width, <small class="dots">...</small>). The options described 63below can be used to control the diagnostic messages formatting 64algorithm, e.g. how many characters per line, how often source location 65information should be reported. Right now, only the C++ front end can 66honor these options. However it is expected, in the near future, that 67the remaining front ends would be able to digest them correctly. 68 69 <dl> 70<dt><code>-fmessage-length=</code><var>n</var><dd><a name="index-fmessage_002dlength-225"></a>Try to format error messages so that they fit on lines of about <var>n</var> 71characters. The default is 72 characters for <samp><span class="command">g++</span></samp> and 0 for the rest of 72the front ends supported by GCC. If <var>n</var> is zero, then no 73line-wrapping will be done; each error message will appear on a single 74line. 75 76 <p><a name="index-fdiagnostics_002dshow_002dlocation-226"></a><br><dt><code>-fdiagnostics-show-location=once</code><dd>Only meaningful in line-wrapping mode. Instructs the diagnostic messages 77reporter to emit <em>once</em> source location information; that is, in 78case the message is too long to fit on a single physical line and has to 79be wrapped, the source location won't be emitted (as prefix) again, 80over and over, in subsequent continuation lines. This is the default 81behavior. 82 83 <br><dt><code>-fdiagnostics-show-location=every-line</code><dd>Only meaningful in line-wrapping mode. Instructs the diagnostic 84messages reporter to emit the same source location information (as 85prefix) for physical lines that result from the process of breaking 86a message which is too long to fit on a single line. 87 88 <br><dt><code>-fno-diagnostics-show-option</code><dd><a name="index-fno_002ddiagnostics_002dshow_002doption-227"></a><a name="index-fdiagnostics_002dshow_002doption-228"></a>By default, each diagnostic emitted includes text which indicates the 89command line option that directly controls the diagnostic (if such an 90option is known to the diagnostic machinery). Specifying the 91<samp><span class="option">-fno-diagnostics-show-option</span></samp> flag suppresses that behavior. 92 93 <br><dt><code>-Wcoverage-mismatch</code><dd><a name="index-Wcoverage_002dmismatch-229"></a>Warn if feedback profiles do not match when using the 94<samp><span class="option">-fprofile-use</span></samp> option. 95If a source file was changed between <samp><span class="option">-fprofile-gen</span></samp> and 96<samp><span class="option">-fprofile-use</span></samp>, the files with the profile feedback can fail 97to match the source file and GCC can not use the profile feedback 98information. By default, this warning is enabled and is treated as an 99error. <samp><span class="option">-Wno-coverage-mismatch</span></samp> can be used to disable the 100warning or <samp><span class="option">-Wno-error=coverage-mismatch</span></samp> can be used to 101disable the error. Disable the error for this warning can result in 102poorly optimized code, so disabling the error is useful only in the 103case of very minor changes such as bug fixes to an existing code-base. 104Completely disabling the warning is not recommended. 105 106 </dl> 107 108 </body></html> 109 110