Fix --help --target-help duplication
Neil Booth
neil@daikokuya.demon.co.uk
Tue Dec 4 15:50:00 GMT 2001
toplev.c prints the target help twice if you pass both --help and
--target-help.
Fixed thus; bootstrapped and regression tested; I'll commit it to
mainline as obvious.
Neil.
* toplev.c (display_target_options): Don't print twice.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.550
diff -u -p -r1.550 toplev.c
--- toplev.c 2001/12/02 14:38:07 1.550
+++ toplev.c 2001/12/04 23:28:47
@@ -3686,6 +3686,12 @@ static void
display_target_options ()
{
int undoc,i;
+ static bool displayed = false;
+
+ /* Avoid double printing for --help --target-help. */
+ if (displayed)
+ return;
+ displayed = true;
if (ARRAY_SIZE (target_switches) > 1
#ifdef TARGET_OPTIONS
More information about the Gcc-patches
mailing list