delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/01/04:02:33

Date: Thu, 1 Feb 2001 10:55:15 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Windows ME and DJGPP
In-Reply-To: <hd3h7t8mj9s6ijjij6bjd7vokshe4gcvel@4ax.com>
Message-ID: <Pine.SUN.3.91.1010201105439.13803B-100000@is>
MIME-Version: 1.0
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

On Wed, 31 Jan 2001, Jason Green wrote:

> > Eli Zaretskii wrote:
> 
> > > Hmm?  Is this in C or in C++?  I don't think you need any casts in a C
> > > program for assigning int to a double or the other way around.
> > 
> > Nor do you in C++.  It's strange that GCC chooses to warn about
> > this in C++ but not in C.
> 
> Even stranger when you consider that it does so without even *any*
> -W... switches.

My impression is that this is the general attitude of the G++
developers.  It is a source of many flame wars on the GCC mailing
lists (people with strong stomach can try reading that ;-), especially
when serious users of C are trying to keep that attitude at bay and
prevent it from spilling into the C compiler, where it really doesn't
belong.

Since trying to talk to the G++ maintainers them about something like
this is pointless, unless you like being flamed, I won't even try.

> Apart from the obvious problem that the value will be truncated to an
> integer, there is also undefined behaviour when the integer value is
> outside the range of an int.

Undefined behavior means just that.  It does _not_ mean the compiler
has to generate diagnostics.  When the Standard requires diagnostics,
it says so.

- Raw text -


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