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]

language option segfault


(I think I have a merge of mainline and 1.1 branches)

This fixes a bug introduced with `DEFINE_LANG_NAME'.  Most places seem
to check for a null options, but this one forgot.

	* toplev.c (main): check option is non-null before 
	testing against it

Index: toplev.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.c,v
retrieving revision 1.85.2.1
diff -c -r1.85.2.1 toplev.c
*** toplev.c    1998/07/14 16:05:30     1.85.2.1
--- toplev.c    1998/07/17 03:14:32
***************
*** 4313,4319 ****
        /* If this is a language-specific option,
         decode it in a language-specific way.  */
        for (j = NUM_ELEM (documented_lang_options); j--;)
!       if (check_lang_option (argv[i],
documented_lang_options[j].option))
          break;
        
        if (j != -1)
--- 4313,4320 ----
        /* If this is a language-specific option,
         decode it in a language-specific way.  */
        for (j = NUM_ELEM (documented_lang_options); j--;)
!       if (documented_lang_options[j].option &&
!           check_lang_option (argv[i],
documented_lang_options[j].option))
          break;
        
        if (j != -1)

-- 
Leave others their otherness


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