delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/14/02:09:21

Date: Tue, 14 Jan 1997 08:52:50 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: David Stockton <stockton AT bcm DOT tmc DOT edu>
cc: DJGPP Mail List <djgpp AT delorie DOT com>
Subject: Re: How do I know what is ANSI?
In-Reply-To: <199701131653.KAA28581@ginger.imgen.bcm.tmc.edu>
Message-ID: <Pine.SUN.3.91.970114085014.11860J-100000@is>
MIME-Version: 1.0

On Mon, 13 Jan 1997, David Stockton wrote:

> I have been working on a library of C++ routines that I will eventually want
> to compile on several platforms.  They compiled cleanly with "-Wall" but
> when I decided they would port more easily if I made them ANSI compliant.

I don't know what -ansi will do to C++ programs, since there's no ANSI 
C++ standard yet.  Are you sure that switch is documented in the context 
of C++ programs?

> So I added the "-ansi" compile flag and it complained that malloc, calloc,
> etc. had no prototypes.  I am infering from this that they are not ANSI
> standard functions.

That is a wrong inference.  These functions are prototyped on stdlib.h, 
and are defined by ANSI C standard.  Did you include <stdlib.h> in your 
sources?

- Raw text -


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