delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/03/18:00:03

From: "Stephen Howe" <SPAMGUARDstephen DOT howe AT dial DOT pipex DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: *** OFF-TOPIC *** Re: ok, I have more info on problem at hand
Date: Sun, 3 Sep 2000 22:15:30 +0100
Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom
Lines: 28
Message-ID: <8ouf1h$ad3$1@soap.pipex.net>
References: <Mtg9LD_00Uw9QI9Fw3 AT andrew DOT cmu DOT edu> <smd2rskgoliuo3lpknet1pgf39ipfqdhtg AT 4ax DOT com> <Pine DOT LNX DOT 4 DOT 21 DOT 0009021839050 DOT 7932-100000 AT plato DOT wadham DOT ox DOT ac DOT uk> <qdr2rssq4e4v10sl1ud4sj0ahdcnpk19u6 AT 4ax DOT com> <8otati$ei1$1 AT plato DOT wadham DOT ox DOT ac DOT uk>
Reply-To: "Stephen Howe" <SPAMGUARDstephen DOT howe AT dial DOT pipex DOT co DOT uk>
NNTP-Posting-Host: tns254.uk.tnsofres.com
X-Trace: soap.pipex.net 968015729 10659 194.202.213.254 (3 Sep 2000 21:15:29 GMT)
X-Complaints-To: abuse AT uk DOT uu DOT net
NNTP-Posting-Date: 3 Sep 2000 21:15:29 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Path: news.mv.net!newspeer.phoen-x.net!diablo.netcom.net.uk!netcom.net.uk!news.tele.dk!158.43.192.22!join.news.pipex.net!pipex!grot.news.pipex.net!pipex!tube.news.pipex.net!pipex!not-for-mail
Xref: news.mv.net comp.os.msdos.djgpp:103145

J-P <jstacey AT plato DOT wadham DOT ox DOT ac DOT uk> wrote in message
news:8otati$ei1$1 AT plato DOT wadham DOT ox DOT ac DOT uk...

> I think we're going to end up violently agreeing with each other here,
> especially as implicit pointer conversion (bad due to polymorphism) hasn't
> got much to do with realloc().

Then you are to going to have nearly everyone in the C++ community
disagreeing with you. The reason you cannot do

int *p;

p = malloc(10);

in C++ is that it casually breaks the type system (void pointer being
assigned to another pointer). Of course it is ok in C because it has weaker
type checking. This was considered a dangerous hole and so it was removed.
You can find that in "The Design and Evolution of C++ by Stroustrup".  Of
course

p = (int *)malloc(10);

is fine in C++.

Stephen Howe


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019