This is the mail archive of the gdb-patches@sourceware.org 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] Fix PR pascal/2283


 I think that the idea is that these functions
are exported and might be used by
other similar languages, but that this tiny
part is really specific and should not be
used in the case it is called by some
other language code.

  c_val_print is used in several other 
language specific XXX-lang.c files.
  If pascal_val_print gets used 
one day by some other language, the
behavior would be different for pascal and for XXX language.

  But I agree that this is all pretty
hypothetical for now.

  Should we remove it altogether?
It seems that it is the only location
inside pascal specific code
where such a test is performed.

  There are three references to
another language (language_cplus)
inside p-valprint, but this is because
pascal code has no demangler and the C++
demangler is used there.


Pierre
 


> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Eli Zaretskii
> Sent: Wednesday, September 26, 2007 4:08 PM
> To: Jonas Maebe
> Cc: muller@ics.u-strasbg.fr; gdb-patches@sourceware.org
> Subject: Re: [PATCH] Fix PR pascal/2283
> 
> > Cc: "Pierre Muller" <muller@ics.u-strasbg.fr>,
> > 	gdb-patches@sourceware.org
> > From: Jonas Maebe <jonas@freepascal.org>
> > Date: Wed, 26 Sep 2007 16:03:13 +0200
> >
> > In fact, I have no idea why that code (in both the Pascal and
> > Modula-2 cases) even checks the current language, as those routines
> > are obviously language-specific.
> 
> Exactly!  If this code is Pascal-specific, you shouldn't be checking
> the language at all.




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