This covers my changes so far for gcc 7, based on
git log --author=dmalcolm \
002c3f2881626f4dea765f89e4a11be1f4bac240..c3e800b980fb13f42468ceeaf723
a39f4cee0f3e
Validates as XHTML 1.0 Transitional.
OK to commit?
(I don't have a working copy of mhc, so I can't easily test the CSS
markup)
Index: htdocs/gcc-7/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v
retrieving revision 1.5
diff -u -p -r1.5 changes.html
--- htdocs/gcc-7/changes.html 23 Aug 2016 22:43:55 -0000 1.5
+++ htdocs/gcc-7/changes.html 24 Aug 2016 15:25:55 -0000
@@ -45,11 +45,69 @@ For more information, see the
<!-- <h3 id="ada">Ada</h3> -->
<h3 id="c-family">C family</h3>
-<!--
<ul>
- <li></li>
+ <li>gcc 6's C and C++ frontends were able to offer suggestions for
+ misspelled field names:
+ <blockquote><pre>
+<b>spellcheck-fields.cc:52:13:</b> <span class="boldred">error:</span> <b>'struct s'</b> has no member named <b>'colour'</b>; did you mean <b>'color'</b>?
+ return ptr-><span class="boldred">colour</span>;
+ <span class="boldred">^~~~~~</span>
+</pre></blockquote>
+ gcc 7 greatly expands the scope of these suggestions. Firstly, it
+ adds fix-it hints to such suggestions:
+<blockquote><pre>
+<b>spellcheck-fields.cc:52:13:</b> <span class="boldred">error:</span> <b>'struct s'</b> has no member named <b>'colour'</b>; did you mean <b>'color'</b>?
+ return ptr-><span class="boldred">colour</span>;
+ <span class="boldred">^~~~~~</span>
+ <span class="green">color</span>
+</pre></blockquote>
+ The suggestions now cover many other things, such as misspelled
+ function names:
+<blockquote><pre>
+<b>spellcheck-identifiers.c:11:3:</b> <span class="boldmagenta">warning:</span> implicit declaration of function <b>'gtk_widget_showall'</b>; did you mean <b>'gtk_widget_show_all'</b>? [<span class="boldmagenta">-Wimplicit-function-declaration</span>]
+ gtk_widget_showall (w);
+ <span class="boldred">^~~~~~~~~~~~~~~~~~</span>
+ <span class="green">gtk_widget_show_all</span>
+</pre></blockquote>
+ misspelled macro names and enum values:
+<blockquote><pre>
+<b>spellcheck-identifiers.cc:85:11:</b> <span class="boldred">error:</span> <b>'MAX_ITEM'</b> undeclared here (not in a function); did you mean <b>'MAX_ITEMS'</b>?
+ int array[MAX_ITEM];
+ <span class="boldred">^~~~~~~~</span>
+ <span class="green">MAX_ITEMS</span>
+</pre></blockquote>
+ misspelled type names:
+<blockquote><pre>
+<b>spellcheck-typenames.c:7:14:</b> <span class="boldred">error:</span> unknown type name <b>'singed'</b>; did you mean <b>'signed'</b>?
+ void test (singed char e);
+ <span class="boldred">^~~~~~</span>
+ <span class="green">signed</span>
+</pre></blockquote>
+ and, in the C frontend, named initializers:
+<blockquote><pre>
+<b>test.c:7:20:</b> <span class="boldred">error:</span> <b>'struct s'</b> has no member named <b>'colour'</b>; did you mean <b>'color'</b>?
+ struct s test = { .colour = 3 };
+ <span class="boldred">^~~~~~</span>
+ <span class="green">color</span>
+</pre></blockquote></li>
+ <li>gcc's preprocessor can now offer suggestions for misspelled
+ directives, e.g.:
+<blockquote><pre>
+<b>test.c:5:2:</b> <span class="boldred">error:</span>invalid preprocessing directive #endfi; did you mean #endif?
+ <span class="boldred">#endfi</span>
+ <span class="boldred">^~~~~</span>
+ <span class="green">endif</span>
+</pre></blockquote></li>
+ <li>Warnings about format strings now underline the pertinent part of
+ the string, and can offer suggested fixes. In some cases, the
+ pertinent argument is underlined.
+<blockquote><pre>
+<b>test.c:51:29:</b> <span class="boldmagenta">warning:</span> format <b>'%s'</b> expects argument of type <b>'char *'</b>, but argument 3 has type <b>'int'</b> [<span class="boldmagenta">-Wformat=</span>]
+ printf ("foo: %d bar: %s baz: %d", 100, i + j, 102);
+ <span class="boldmagenta">~^</span> <span class="green">~~~~~</span>
+ <span class="green">%d</span>
+</pre></blockquote></li>
</ul>
--->
<h3 id="c">C</h3>
<!--
@@ -59,11 +117,16 @@ For more information, see the
-->
<h3 id="cxx">C++</h3>
-<!--
<ul>
- <li></li>
+ <li>The C++ frontend will now provide fix-it hints for some missing
+ semicolons, allowing for automatic fixes by IDEs:
+<blockquote><pre>
+<b>test.cc:4:11:</b> <span class="boldred">error:</span> expected <b>';'</b> after class definition
+ class a {}
+ <span class="boldred">^</span>
+ <span class="green">;</span>
+</pre></blockquote></li>
</ul>
--->
<h4 id="libstdcxx">Runtime Library (libstdc++)</h4>
<!--
@@ -95,7 +158,17 @@ For more information, see the
<!-- <h3 id="java">Java (GCJ)</h3> -->
<!-- .................................................................. -->
-<!-- <h2 id="jit">libgccjit</h2> -->
+<h2 id="jit">libgccjit</h2>
+<p>The libgccjit API gained support for marking calls as requiring
+tail-call optimization via a new entrypoint:
+<a href="https://gcc.gnu.org/onlinedocs/jit/topics/expressions.html#gcc_jit_rvalue_set_bool_require_tail_call">gcc_jit_rvalue_set_bool_require_tail_call</a>.</p>
+
+<p>libgccjit performs numerous checks at the API boundary, but
+if these succeed, it previously ignored errors and other diagnostics emitted
+within the core of gcc, and treated the compile of a gcc_jit_context
+as having succeeded. As of gcc 7 it now ensures that if any diagnostics are
+emitted, they are visible from the libgccjit API, and that the the context is
+flagged as having failed.</p>
<!-- .................................................................. -->
<h2 id="targets">New Targets and Target Specific Improvements</h2>
@@ -152,11 +225,84 @@ For more information, see the
<!-- .................................................................. -->
<h2>Other significant improvements</h2>
-<!--
<ul>
- <li></li>
+ <li><code>-fverbose-asm</code> previously emitted information on the
+ meanings of assembly expressions. This has been extended so that
+ it now also prints comments showing the source lines that correspond
+ to the assembly, making it easier to read the generated assembly
+ (especially with larger functions).
+ For example, given this C source file:
+<blockquote><pre>
+int test (int n)
+{
+ int i;
+ int total = 0;
+
+ for (i = 0; i < n; i++)
+ total += i * i;
+ return total;
+}
+</pre></blockquote>
+ <code>-fverbose-asm</code> now gives output similar to this for
+ the function body (when compiling for x86_64, with
+ <code>-Os</code>):
+<blockquote><pre>
+ .text
+ .globl test
+ .type test, @@function
+test:
+.LFB0:
+ .cfi_startproc
+# example.c:4: int total = 0;
+ xorl %eax, %eax # <retval>
+# example.c:6: for (i = 0; i < n; i++)
+ xorl %edx, %edx # i
+.L2:
+# example.c:6: for (i = 0; i < n; i++)
+ cmpl %edi, %edx # n, i
+ jge .L5 #,
+# example.c:7: total += i * i;
+ movl %edx, %ecx # i, tmp92
+ imull %edx, %ecx # i, tmp92
+# example.c:6: for (i = 0; i < n; i++)
+ incl %edx # i
+# example.c:7: total += i * i;
+ addl %ecx, %eax # tmp92, <retval>
+ jmp .L2 #
+.L5:
+# example.c:10: }
+ ret
+ .cfi_endproc
+</pre></blockquote></li>
+ <li>A new option <code>-fdiagnostics-parseable-fixits</code> allows for
+ fix-it hints to be emitted in a machine-readable form, suitable for
+ consumption by IDEs. For example, given:
+<blockquote><pre>
+<b>spellcheck-fields.cc:52:13:</b> <span class="boldred">error:</span> <b>'struct s'</b> has no member named <b>'colour'</b>; did you mean <b>'color'</b>?
+ return ptr-><span class="boldred">colour</span>;
+ <span class="boldred">^~~~~~</span>
+ <span class="green">color</span>
+</pre></blockquote>
+it would emit:
+<blockquote><pre>
+fix-it:"spellcheck-fields.cc":{52:13-52:19}:"color"
+</pre></blockquote></li>
+ <li>The <code>gcc</code> and <code>g++</code> driver programs will now
+ provide suggestions for misspelled arguments to command line options.
+<blockquote><pre>
+$ gcc -c test.c -ftls-model=global-dinamic
+gcc: <span class="boldred">error:</span> unknown TLS model <b>'global-dinamic'</b>
+gcc: <span class="boldcyan">note:</span> valid arguments to <b>'-ftls-model='</b> are: global-dynamic initial-exec local-dynamic local-exec; did you mean <b>'global-dynamic'</b>?
+</pre></blockquote></li>
+ <li>The compiler will now provide suggestions for misspelled parameters.
+<blockquote><pre>
+$ gcc -c test.c --param max-early-inliner-iteration=3
+cc1: <span class="boldred">error:</span> invalid --param name <b>'max-early-inliner-iteration'</b>; did you mean <b>'max-early-inliner-iterations'</b>?
+</pre></blockquote></li>
+
+ <li>GCC has gained an internal unit-testing framework, allowing for
+ more detailed testing of its implementation details.</li>
</ul>
--->
<!-- <h2><a name="7.1">GCC 7.1</a></h2>