Message ID | 061259ae-4189-8f4a-f482-4619a130c907@gmail.com |
---|---|
State | New |
Headers | show |
Series | [wwwdocs] add gcc 9 changes | expand |
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-03/msg00147.html On 3/4/19 5:28 PM, Martin Sebor wrote: > Attached is a patch with (mostly) my changes for GCC 9. To make > things easier to find I grouped related changes together within > the sections I changed. I put warnings under the same bullet, > built-ins, and attributes. > > Martin
On 3/4/19 5:28 PM, Martin Sebor wrote: > Attached is a patch with (mostly) my changes for GCC 9. To make > things easier to find I grouped related changes together within > the sections I changed. I put warnings under the same bullet, > built-ins, and attributes. I have a few nit-picky comments... s/command line option/command-line option/g s/command line utilitly/command-line utility/ (typo, not just hyphen) s/red-zones/red zones/g Please try to reformat this to avoid lines longer than 80 characters, except where it's unavoidable in <a href="..."> markup. -Sandra
On 3/17/19 11:24 AM, Sandra Loosemore wrote: > On 3/4/19 5:28 PM, Martin Sebor wrote: >> Attached is a patch with (mostly) my changes for GCC 9. To make >> things easier to find I grouped related changes together within >> the sections I changed. I put warnings under the same bullet, >> built-ins, and attributes. > > I have a few nit-picky comments... > > s/command line option/command-line option/g > s/command line utilitly/command-line utility/ (typo, not just hyphen) > s/red-zones/red zones/g Fixed. > > Please try to reformat this to avoid lines longer than 80 characters, > except where it's unavoidable in <a href="..."> markup. I spotted just a couple of lines in the diff that were exactly 80 characters long but I'm not sure where else this could be done. AFAICS, all the long lines I added are because of the <a href="..."> tags. There are a few lines in the file that the patch doesn't touch that are a few characters over 80. Because of the <a href...> tags and the overall lack of consistency in indentation (two vs four spaces) I don't think it matters enough here to spend time changing. Martin PS We could fit most lines into 80 characters by introducing some macro for all the <a href="gcc-option.html> tags. That would make it easier to insert these links too. E.g., <option>-falign-functions</option> could be expanded by some post-processing script into <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-functions"><code>-falign-functions</code></a> That way the option links would also continue to work even if in some later release the options were removed or renamed. (In GCC 8 I made the links point at the gcc-8.1.0 docs but I haven't done it here.) I don't know enough about how these files are processed to do this. Index: gcc-9/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v retrieving revision 1.49 diff -u -r1.49 changes.html --- gcc-9/changes.html 28 Feb 2019 21:49:05 -0000 1.49 +++ gcc-9/changes.html 5 Mar 2019 00:18:18 -0000 @@ -60,8 +60,17 @@ <!-- .................................................................. --> <h2 id="general">General Improvements</h2> +<p>The following GCC command line options have been introduced or improved.</p> <ul> <li> + All command line options that take a <i>byte-size</i> argument accept + 64-bit integers as well as standard SI and IEC suffixes such as + <code>kb</code> and <code>KiB</code>, <code>MB</code> and <code>MiB</code>, + or <code>GB</code> and <code>GiB</code> denoting the corresponding + multiples of bytes. See + <a href="https://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html#Invoking-GCC">Invoking GCC</a> for more. + </li> + <li> A new option, <a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flive-patching"><code>-flive-patching=[inline-only-static|inline-clone]</code></a>, has been introduced to provide a safe compilation for live-patching. At the same time, provides multiple-level control on the enabled IPA optimizations. @@ -79,9 +88,41 @@ alignment (e.g. <code>-falign-loops=n:m:n2:m2</code>). </li> <li> - A new built-in function, <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability"><code>__builtin_expect_with_probability</code></a>, - has been added. + New pair of profiling options (<a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-filter-files"><code>-fprofile-filter-files</code></a> + and <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-exclude-files"><code>-fprofile-exclude-files</code></a>) has been added. + The options help to filter which source files are instrumented. + </li> + <li> + AddressSanitizer generates more compact red-zones for automatic variables. + That helps to reduce memory footprint of a sanitized binary. </li> +</ul> +<p>The following built-in functions have been introduced.</p> +<ul> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability"><code>__builtin_expect_with_probability</code></a> to provide branch prediction probability hints to + the optimizer. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fhas_005fattribute-1"><code>__builtin_has_attribute</code></a> determines whether a function, type, or variable has been declared with some + attribute. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fspeculation_005fsafe_005fvalue-1"><code>__builtin_speculation_safe_value</code></a> can be used to help mitigate against unsafe speculative + execution. + </li> +</ul> +<p>The following attributes have been introduced.</p> +<ul> + <li> + The <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-copy-function-attribute"><code>copy</code></a> function attribute has been + added. The attribute can also be applied to type definitions and to + variable declarations. + </li> +</ul> +<p>A large number of improvements to code generation have been made, + including but not limited to the following.</p> +<ul> <li> Switch expansion has been improved by using a different strategy (jump table, bit test, decision tree) for a subset of switch cases. @@ -106,6 +147,10 @@ can be transformed into <code>100 * how + 5</code> (for values defined in the switch statement). </li> +</ul> +<p>The following improvements to the <tt>gcov</tt> command line utilitly + have been made.</p> +<ul> <li> The gcov tool received a new option <a href="https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov"><code>--use-hotness-colors</code></a> (<code>-q</code>) that can provide perf-like coloring of hot functions. @@ -113,15 +158,6 @@ <li> The gcov tool has changed its intermediate format to a new JSON format. </li> - <li> - New pair of profiling options (<a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-filter-files"><code>-fprofile-filter-files</code></a> - and <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-exclude-files"><code>-fprofile-exclude-files</code></a>) has been added. - The options help to filter which source files are instrumented. - </li> - <li> - AddressSanitizer generates more compact red-zones for automatic variables. - That helps to reduce memory footprint of a sanitized binary. - </li> </ul> <!-- .................................................................. --> @@ -139,7 +175,6 @@ not supported in the GCC 9 release see <a href="https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00628.html">this mail</a>. </li> - <li>New extensions: <ul> <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html#index-_005f_005fbuiltin_005fconvertvector"><code>__builtin_convertvector</code></a> built-in for vector conversions @@ -152,7 +187,40 @@ warns about an unaligned pointer value from the address of a packed member of a struct or union. </li> - </ul></li> + </ul> + + <li>Enhancements to existing warnings: + <ul> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-bounds"><code>-Warray-bounds</code></a> detects more instances + of out-of-bounds indices. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattribute-alias"><code>-Wattribute-alias</code></a> also detects attribute + mismatches between alias declarations and their targets, in addition + to mismatches between their types. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-overflow"><code>-Wformat-overflow</code></a> and + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-truncation"><code>-Wformat-truncation</code></a> have been extended + to all formatted input/output functions (where applicable) and + enhanced to detect a subset of instances of reading past the end + of unterminated constant character arrays in <code>%s</code> + directives. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmissing-attributes"><code>-Wmissing-attributes</code></a> detects instances + of missing function attributes on declarations of aliases and weak + references. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-truncation"><code>-Wstringop-truncation</code></a> also detects + a subset of instances of reading past the end of unterminated + constant character arrays, + </li> + </ul> + </li> + </ul> <h3 id="c">C</h3>
On 3/18/19 10:59 AM, Martin Sebor wrote: > On 3/17/19 11:24 AM, Sandra Loosemore wrote: >> On 3/4/19 5:28 PM, Martin Sebor wrote: >>> Attached is a patch with (mostly) my changes for GCC 9. To make >>> things easier to find I grouped related changes together within >>> the sections I changed. I put warnings under the same bullet, >>> built-ins, and attributes. >> >> I have a few nit-picky comments... >> >> s/command line option/command-line option/g >> s/command line utilitly/command-line utility/ (typo, not just hyphen) >> s/red-zones/red zones/g > > Fixed. > >> >> Please try to reformat this to avoid lines longer than 80 characters, >> except where it's unavoidable in <a href="..."> markup. > > I spotted just a couple of lines in the diff that were exactly > 80 characters long but I'm not sure where else this could be > done. AFAICS, all the long lines I added are because of > the <a href="..."> tags. > > There are a few lines in the file that the patch doesn't touch > that are a few characters over 80. Because of the <a href...> > tags and the overall lack of consistency in indentation (two vs > four spaces) I don't think it matters enough here to spend time > changing. > > Martin > > PS We could fit most lines into 80 characters by introducing some > macro for all the <a href="gcc-option.html> tags. That would make > it easier to insert these links too. E.g., > <option>-falign-functions</option> could be expanded by some > post-processing script into > > <a > href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-functions"><code>-falign-functions</code></a> > > > That way the option links would also continue to work even if > in some later release the options were removed or renamed. (In > GCC 8 I made the links point at the gcc-8.1.0 docs but I haven't > done it here.) I don't know enough about how these files are > processed to do this. > > gcc-9-changes.diff OK jeff
Index: gcc-9/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v retrieving revision 1.49 diff -u -r1.49 changes.html --- gcc-9/changes.html 28 Feb 2019 21:49:05 -0000 1.49 +++ gcc-9/changes.html 5 Mar 2019 00:18:18 -0000 @@ -60,8 +60,17 @@ <!-- .................................................................. --> <h2 id="general">General Improvements</h2> +<p>The following GCC command line options have been introduced or improved.</p> <ul> <li> + All command line options that take a <i>byte-size</i> argument accept + 64-bit integers as well as standard SI and IEC suffixes such as + <code>kb</code> and <code>KiB</code>, <code>MB</code> and <code>MiB</code>, + or <code>GB</code> and <code>GiB</code> denoting the corresponding + multiples of bytes. See + <a href="https://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html#Invoking-GCC">Invoking GCC</a> for more. + </li> + <li> A new option, <a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flive-patching"><code>-flive-patching=[inline-only-static|inline-clone]</code></a>, has been introduced to provide a safe compilation for live-patching. At the same time, provides multiple-level control on the enabled IPA optimizations. @@ -79,9 +88,41 @@ alignment (e.g. <code>-falign-loops=n:m:n2:m2</code>). </li> <li> - A new built-in function, <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability"><code>__builtin_expect_with_probability</code></a>, - has been added. + New pair of profiling options (<a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-filter-files"><code>-fprofile-filter-files</code></a> + and <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-exclude-files"><code>-fprofile-exclude-files</code></a>) has been added. + The options help to filter which source files are instrumented. + </li> + <li> + AddressSanitizer generates more compact red-zones for automatic variables. + That helps to reduce memory footprint of a sanitized binary. </li> +</ul> +<p>The following built-in functions have been introduced.</p> +<ul> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability"><code>__builtin_expect_with_probability</code></a> to provide branch prediction probability hints to + the optimizer. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fhas_005fattribute-1"><code>__builtin_has_attribute</code></a> determines whether a function, type, or variable has been declared with some + attribute. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fspeculation_005fsafe_005fvalue-1"><code>__builtin_speculation_safe_value</code></a> can be used to help mitigate against unsafe speculative + execution. + </li> +</ul> +<p>The following attributes have been introduced.</p> +<ul> + <li> + The <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-copy-function-attribute"><code>copy</code></a> function attribute has been + added. The attribute can also be applied to type definitions and to + variable declarations. + </li> +</ul> +<p>A large number of improvements to code generation have been made, + including but not limited to the following.</p> +<ul> <li> Switch expansion has been improved by using a different strategy (jump table, bit test, decision tree) for a subset of switch cases. @@ -106,6 +147,10 @@ can be transformed into <code>100 * how + 5</code> (for values defined in the switch statement). </li> +</ul> +<p>The following improvements to the <tt>gcov</tt> command line utilitly + have been made.</p> +<ul> <li> The gcov tool received a new option <a href="https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov"><code>--use-hotness-colors</code></a> (<code>-q</code>) that can provide perf-like coloring of hot functions. @@ -113,15 +158,6 @@ <li> The gcov tool has changed its intermediate format to a new JSON format. </li> - <li> - New pair of profiling options (<a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-filter-files"><code>-fprofile-filter-files</code></a> - and <a href="https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-exclude-files"><code>-fprofile-exclude-files</code></a>) has been added. - The options help to filter which source files are instrumented. - </li> - <li> - AddressSanitizer generates more compact red-zones for automatic variables. - That helps to reduce memory footprint of a sanitized binary. - </li> </ul> <!-- .................................................................. --> @@ -139,7 +175,6 @@ not supported in the GCC 9 release see <a href="https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00628.html">this mail</a>. </li> - <li>New extensions: <ul> <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html#index-_005f_005fbuiltin_005fconvertvector"><code>__builtin_convertvector</code></a> built-in for vector conversions @@ -152,7 +187,40 @@ warns about an unaligned pointer value from the address of a packed member of a struct or union. </li> - </ul></li> + </ul> + + <li>Enhancements to existing warnings: + <ul> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-bounds"><code>-Warray-bounds</code></a> detects more instances + of out-of-bounds indices. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattribute-alias"><code>-Wattribute-alias</code></a> also detects attribute + mismatches between alias declarations and their targets, in addition + to mismatches between their types. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-overflow"><code>-Wformat-overflow</code></a> and + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-truncation"><code>-Wformat-truncation</code></a> have been extended + to all formatted input/output functions (where applicable) and + enhanced to detect a subset of instances of reading past the end + of unterminated constant character arrays in <code>%s</code> + directives. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmissing-attributes"><code>-Wmissing-attributes</code></a> detects instances + of missing function attributes on declarations of aliases and weak + references. + </li> + <li> + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-truncation"><code>-Wstringop-truncation</code></a> also detects + a subset of instances of reading past the end of unterminated + constant character arrays, + </li> + </ul> + </li> + </ul> <h3 id="c">C</h3>