This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfc] clean up type_error() and range_error()


> 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




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