More fortran dir warning fixes

Jeffrey A Law law@cygnus.com
Tue Nov 30 23:59:00 GMT 1999


  In message < 199911281558.KAA12488@caip.rutgers.edu >you write:
  > 1999-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
  > 
  > 	* com.c (ffecom_file_, ffecom_file, file_buf,
  > 	ffecom_open_include_): Constify a char*.
  > 	(ffecom_possible_partial_overlap_): Mark parameter `expr2' with
  > 	ATTRIBUTE_UNUSED.
  > 	(ffecom_init_0): Use a fully prototyped cast in call to bsearch.
  > 	(lang_print_error_function): ANSI-fy.
  > 
  > 	* com.h (ffecom_file): Constify a char*.
  > 
  > 	* fini.c (main): Call return, not exit.
  > 
  > 	* g77spec.c (lang_specific_driver): Use non-const *in_argv in
  > 	assignment.
  > 
  > 	* intrin.c (ffeintrin_cmp_name_): Don't needlessly cast away
  > 	const-ness.
Mostly OK.  One comment below.

  >        name = bsearch ("foo", &names[0], ARRAY_SIZE (names), sizeof (names[
  > 0]),
  > -		      (int (*)()) strcmp);
  > +		      (int (*)(const void *, const void *)) strcmp);
I get a little worried when we have to cast system level function pointers
like this.  What precisely about strcmp is causing problems?

jeff




More information about the Gcc-patches mailing list