This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] grab all contents of multiline help in *.opt


Multi-line help texts are currently cut off, see for example:
(GNU sed-specific notation)

$ gcc -v --help 2>/dev/null | sed '/-std=c++0x/{N;N;p;}; d'

This patch fixes it.

I think this is no regression, but a long-standing bug; it may be that
older GCC simply didn't have multi-line help strings in .opt files; I
haven't checked.

So, OK for 4.5?

Thanks,
Ralf

gcc/ChangeLog:
2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* optc-gen.awk: Assign all remaining fields to help string,
	space-separated, for multi-line help in *.opt.

diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index 860810a..3e644a5 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -53,6 +53,8 @@ BEGIN {
 				opts[n_opts]  = $1
 				flags[n_opts] = $2
 				help[n_opts]  = $3
+				for (i = 4; i <= NF; i++)
+					help[n_opts] = help[n_opts] " " $i
 				n_opts++;
 			}
 		}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]