public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wwwdocs] Add -fdiagnostics-generate-patch to changes.html
@ 2017-01-27 16:13 David Malcolm
  2017-01-27 20:40 ` Gerald Pfeifer
  0 siblings, 1 reply; 2+ messages in thread
From: David Malcolm @ 2017-01-27 16:13 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

The following patch to the website adds -fdiagnostics-generate-patch to
gcc 7's changes.html.

It consolidates the documentation with that for -fdiagnostics-parseable
-fixits, so that they can share an example.

Successfully validated.

OK to commit?

[-- Attachment #2: printing-fixit-hints.patch --]
[-- Type: text/x-patch, Size: 2012 bytes --]

Index: htdocs/gcc-7/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v
retrieving revision 1.39
diff -u -p -r1.39 changes.html
--- htdocs/gcc-7/changes.html	17 Jan 2017 21:26:31 -0000	1.39
+++ htdocs/gcc-7/changes.html	27 Jan 2017 16:03:47 -0000
@@ -599,9 +599,12 @@ test:
        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:
+  <li id="printing-fix-it-hints">Two new options have been added for
+    printing fix-it hints:
+    <ul>
+      <li><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-&gt;<span class="boldred">colour</span>;
@@ -612,6 +615,21 @@ it will emit:
 <blockquote><pre>
 fix-it:"spellcheck-fields.cc":{52:13-52:19}:"color"
 </pre></blockquote></li>
+      <li><code>-fdiagnostics-generate-patch</code> will print
+        a patch in "unified" format after any diagnostics are printed,
+        showing the result of applying all fix-it hints.  For the above
+        example it would emit:
+<blockquote><pre>
+<b>--- spellcheck-fields.cc</b>
+<b>+++ spellcheck-fields.cc</b>
+<span class="boldmagenta">@@ -49,5 +49,5 @@</span>
+
+ color get_color(struct s *ptr)
+ {
+<span class="boldred">-  return ptr-&gt;colour;</span>
+<span class="green">+  return ptr-&gt;color;</span>
+ }
+</pre></blockquote></li></ul></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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [wwwdocs] Add -fdiagnostics-generate-patch to changes.html
  2017-01-27 16:13 [wwwdocs] Add -fdiagnostics-generate-patch to changes.html David Malcolm
@ 2017-01-27 20:40 ` Gerald Pfeifer
  0 siblings, 0 replies; 2+ messages in thread
From: Gerald Pfeifer @ 2017-01-27 20:40 UTC (permalink / raw)
  To: David Malcolm; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

On Fri, 27 Jan 2017, David Malcolm wrote:
> The following patch to the website adds -fdiagnostics-generate-patch 
> to gcc 7's changes.html.
> 
> It consolidates the documentation with that for -fdiagnostics-parseable
> -fixits, so that they can share an example.

This looks fine, thank you, David!

Gerald

[-- Attachment #2: Type: text/x-patch, Size: 2012 bytes --]

Index: htdocs/gcc-7/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v
retrieving revision 1.39
diff -u -p -r1.39 changes.html
--- htdocs/gcc-7/changes.html	17 Jan 2017 21:26:31 -0000	1.39
+++ htdocs/gcc-7/changes.html	27 Jan 2017 16:03:47 -0000
@@ -599,9 +599,12 @@ test:
        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:
+  <li id="printing-fix-it-hints">Two new options have been added for
+    printing fix-it hints:
+    <ul>
+      <li><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-&gt;<span class="boldred">colour</span>;
@@ -612,6 +615,21 @@ it will emit:
 <blockquote><pre>
 fix-it:"spellcheck-fields.cc":{52:13-52:19}:"color"
 </pre></blockquote></li>
+      <li><code>-fdiagnostics-generate-patch</code> will print
+        a patch in "unified" format after any diagnostics are printed,
+        showing the result of applying all fix-it hints.  For the above
+        example it would emit:
+<blockquote><pre>
+<b>--- spellcheck-fields.cc</b>
+<b>+++ spellcheck-fields.cc</b>
+<span class="boldmagenta">@@ -49,5 +49,5 @@</span>
+
+ color get_color(struct s *ptr)
+ {
+<span class="boldred">-  return ptr-&gt;colour;</span>
+<span class="green">+  return ptr-&gt;color;</span>
+ }
+</pre></blockquote></li></ul></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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-27 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 16:13 [wwwdocs] Add -fdiagnostics-generate-patch to changes.html David Malcolm
2017-01-27 20:40 ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).