From 784d223de9178eb7b18dcadebd9c173d304f4232 Mon Sep 17 00:00:00 2001 From: obrien Date: Wed, 3 Jan 2001 18:05:31 +0000 Subject: Merge rev 1.2 (-fformat-extensions); 1.{7,9} (complain about -O2 on the Alpha & FORCE_OPTIMIZATION_DOWNGRADE); 1.8 (-Wnon-const-format) into GCC 2.95.3(RC#1). --- contrib/gcc/toplev.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'contrib/gcc') diff --git a/contrib/gcc/toplev.c b/contrib/gcc/toplev.c index 051dcae..4889637 100644 --- a/contrib/gcc/toplev.c +++ b/contrib/gcc/toplev.c @@ -4692,7 +4692,8 @@ check_lang_option (option, lang_option) { lang_independent_options * indep_options; int len; - long k; + int numopts; + long k; char * space; /* Ignore NULL entries. */ @@ -4722,8 +4723,14 @@ check_lang_option (option, lang_option) switch (option[1]) { - case 'f': indep_options = f_options; break; - case 'W': indep_options = W_options; break; + case 'f': + indep_options = f_options; + numopts = NUM_ELEM (f_options); + break; + case 'W': + indep_options = W_options; + numopts = NUM_ELEM (W_options); + break; default: return 1; } @@ -4735,7 +4742,7 @@ check_lang_option (option, lang_option) if (option[0] == 'n' && option[1] == 'o' && option[2] == '-') option += 3; - for (k = NUM_ELEM (indep_options); k--;) + for (k = numopts; k--;) { if (!strcmp (option, indep_options[k].string)) { -- cgit v1.1