Re: [patch, doc] fix some overfull hboxes

2017-12-19 Thread Michel Morin
Hi,

> Index: gcc/doc/invoke.texi
[...]
> +In C++14, @code{f} calls calls @code{f}, but in

->
  +In C++14, @code{f(g)} calls @code{f}, but in
?

(Sorry for unthreading..., I haven't subscribed this ML yet and I couldn't set
"In-Reply-To" header manually on Gmail web interface.)

Regards,
Michel


[patch, doc] fix some overfull hboxes

2017-12-17 Thread Sandra Loosemore
I've checked in this patch to fix some formatting problems that caused 
overfull hbox (that is, lines that overflow the margin) warnings when 
building the GCC user manual.


This isn't exhaustive -- in particular, I see that the long CPU names in 
the AArch64 and ARM options sections are causing a pile of both 
underfull and overfull hbox warnings.  I think the solution here is to 
format these lists in a more tabular way instead of as flowed text 
(perhaps like @gccoptlist formatting in the "Option Summary" section) 
and do it that way uniformly for all targets that have such lists. 
That's a bigger project which I'll throw back into the pile for now.


-Sandra
2017-12-17  Sandra Loosemore  

	gcc/
	* doc/extend.texi (x86 Function Attributes): Reformat nocf_check
	example	to avoid overfull hbox.
	* doc/invoke.texi (Option Summary): Add missing @gol.
	(C++ Dialect Options): Reformat -Wnoexcept-type example to avoid 
	overfull hbox.
	
Index: gcc/doc/extend.texi
===
--- gcc/doc/extend.texi	(revision 255772)
+++ gcc/doc/extend.texi	(working copy)
@@ -5765,21 +5765,27 @@ int foo (void) __attribute__(nocf_check)
 void (*foo1)(void) __attribute__(nocf_check);
 void (*foo2)(void);
 
+/* foo's address is assumed to be valid.  */
 int
-foo (void) /* The function's address is assumed to be valid.  */
+foo (void) 
 
-  /* This call site is not checked for control-flow validity.  */
+  /* This call site is not checked for control-flow 
+ validity.  */
   (*foo1)();
 
-  foo1 = foo2; /* A warning is printed about attribute mismatch.  */
-  /* This call site is still not checked for control-flow validity.  */
+  /* A warning is issued about attribute mismatch.  */
+  foo1 = foo2; 
+
+  /* This call site is still not checked.  */
   (*foo1)();
 
-  /* This call site is checked for control-flow validity.  */
+  /* This call site is checked.  */
   (*foo2)();
 
-  foo2 = foo1; /* A warning is printed about attribute mismatch.  */
-  /* This call site is still checked for control-flow validity.  */
+  /* A warning is issued about attribute mismatch.  */
+  foo2 = foo1; 
+
+  /* This call site is still checked.  */
   (*foo2)();
 
   return 0;
Index: gcc/doc/invoke.texi
===
--- gcc/doc/invoke.texi	(revision 255773)
+++ gcc/doc/invoke.texi	(working copy)
@@ -549,7 +549,7 @@ Objective-C and Objective-C++ Dialects}.
 -fdisable-tree-@var{pass-name}=@var{range-list} @gol
 -fdump-noaddr  -fdump-unnumbered  -fdump-unnumbered-links @gol
 -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
--fdump-final-insns@r{[}=@var{file}@r{]}
+-fdump-final-insns@r{[}=@var{file}@r{]} @gol
 -fdump-ipa-all  -fdump-ipa-cgraph  -fdump-ipa-inline @gol
 -fdump-lang-all @gol
 -fdump-lang-@var{switch} @gol
@@ -2935,12 +2935,18 @@ Warn if the C++17 feature making @code{n
 type changes the mangled name of a symbol relative to C++14.  Enabled
 by @option{-Wabi} and @option{-Wc++17-compat}.
 
+As an example:
+
 @smallexample
 template  void f(T t) @{ t(); @};
 void g() noexcept;
-void h() @{ f(g); @} // in C++14 calls f, in C++17 calls f
+void h() @{ f(g); @} 
 @end smallexample
 
+@noindent
+In C++14, @code{f} calls calls @code{f}, but in
+C++17 it calls @code{f}.
+
 @item -Wclass-memaccess @r{(C++ and Objective-C++ only)}
 @opindex Wclass-memaccess
 Warn when the destination of a call to a raw memory function such as