This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: More fortran dir warning fixes
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: More fortran dir warning fixes
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 28 Nov 1999 13:18:08 -0700
- cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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