delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/20/15:18:15

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Tue, 20 Jul 2004 22:16:52 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <3791-Tue20Jul2004221652+0300-eliz@gnu.org>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <20040720073802.22465.00000145@mb-m11.aol.com> (sterten@aol.com)
Subject: Re: strange error
References: <2m4apdFht547U1 AT uni-berlin DOT de> <20040720073802 DOT 22465 DOT 00000145 AT mb-m11 DOT aol DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: sterten AT aol DOT com (Sterten)
> Newsgroups: comp.os.msdos.djgpp
> Date: 20 Jul 2004 11:38:02 GMT
> 
> (why else would the program run ?)

Because C gives you enough rope to hang yourself, if that's what you
want.

In a C program, you are supposed to know what you are doing better
than the compiler and the runtime environment do.  So they just let
your program run, and if it bombs, so be it.

That's why it is important to use -Wall and other warning devices:
they re4veal possible bugs before they actually hit you.

> I don't understand. 
> -g makes the program run correctly, while omitting it doesn't. (why ?)

Because your program has a bug that depends on the precise code that
is generated, and -g changes the code produced by the compiler.

- Raw text -


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