delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/05/06:13:15

From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP structs
Date: 5 Mar 1997 09:54:01 GMT
Organization: Oxford University
Lines: 17
Message-ID: <5fjfrp$b5v@news.ox.ac.uk>
References: <5fiu3p$bne AT freenet-news DOT carleton DOT ca>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Paul Derbyshire (ao950 AT FreeNet DOT Carleton DOT CA) wrote:


: I have never explicitly cast a malloc pointer when assigning it. Even with
: my usual -Wall -Werror it never causes any complaint from gcc.

: Are you sure  this is non-ansi?

: mypointer=malloc(size);

I'm not sure what the standard says for C programs, but for C++ programs it
is definitely not allowed - try it. I was under the impression that ANSI C
was basically ANSI C++ without classes; clearly I'm wrong.

-- 
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.

- Raw text -


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