Mail Archives: djgpp/2001/02/01/20:37:50
Steamer <dontmailme AT iname DOT com> schrieb Folgendes:
> Rudolf Polzer wrote:
>
> > > > > Compiling: x.cpp
> > > > > In function `double intconv<double>(double>':
> > > > > x.cpp (9) Error: instantiated from here
> > >
> > > (Of course, this isn't an error, it's just a RHIDE misinterpretation
> > > of a warning message, which was what Rudolf Polzer was pointing out.
> > > I thought this was fixed in newer versions of RHIDE.)
> >
> > I have version 1.4.7 of Nov 15 1998 in Linux (do not know my version in
> > DOS, but both have the same bug). Is there a newer one, and if yes, where
> > to get it? I got 1.4.7 from a "RHIDE homepage".
>
> Maybe it hasn't been fixed then. I seem to recall someone saying
> it had been fixed, but as I don't use RHIDE I'm not really sure.
>
> > > In any case, C++ is only slightly more strongly typed than C,
> > > and there is no difference at all as far as initializing an int
> > > with a double is concerned.
> >
> > Not really. C++ supports const, while C does not
>
> Yes, C borrowed 'const' from C++ at a late stage, and its
> meaning was diluted in the process.
>
> > (and allegro is buggy
> > here: functions like textout take a char * where a const char * would be
> > correct; this causes code lines like
> > textout (x, y, const_cast <char *> (s.c_str ()));
> > which is very ugly). Why don't the allegroers just insert the const
> > keywords?
>
> Probably because Allegro is a C library, and const correctness is
> of little importance in C. Why don't you just insert the const
> keywords, and send them the diffs?
Because I do not know of each function if it manipulates its char *
argument. Also, I would have to change all sources and do not know if each
compiler that Allegro works on supports const (or just ignores it).
--
Nuper erat medicus, nunc est vispillo, Diaulus:
Quod vispillo facit, fecerat et medicus.
- Raw text -