This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc] clean up type_error() and range_error()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 01 Feb 2002 22:23:38 -0500
- Subject: Re: [patch/rfc] clean up type_error() and range_error()
- References: <3C59647D.8090405@cygnus.com>
> Hello,
>
> (The function type_error() doesn't appear to be used but I'll ignore that :-)
>
> The funtion pair type_error() and parse_error() either print errors or warning depending on a corresponding internal variable. The wierd thing is that they they still print the warning when that variable is set to _off_. I suspect, because the code is only used by Fortran and Modula-2, no one has noticed.
>
> Thoughts?
>
> Anyway, ignoring that, this cleans up those functions. I'l check it in in a day or so.
>
> enjoy,
> Andrew
I've cheched the below in. The always printing the message behavour is
preserved.
> 2002-01-31 Andrew Cagney <ac131313@redhat.com>
>
> * language.h (type_error, range_error): Make string parameter
> constant.
> * language.c (warning_pre_print): Delete extern declaration.
> * dwarfread.c (warning_pre_print): Ditto.
> * language.c (type_error, range_error): Rewrite to use verror and
> vwarning instead of warning_begin.
>
>
enjoy,
Andrew