delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/31/03:13:23

Date: Wed, 31 Jan 2001 10:11:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Rudolf Polzer <rpolzer AT web DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: Windows ME and DJGPP
In-Reply-To: <slrn97bc57.4d2.rpolzer@rebounce.rpolzer-lx>
Message-ID: <Pine.SUN.3.91.1010131101046.29266K-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 Mon, 29 Jan 2001, Rudolf Polzer wrote:

> no -W switch, the only warnings I accept are about implicit conversions
> between int and double since an explicit typecast for such a conversion
> (static_cast) looks terrible. Since I often use long double and I do not
> like C cast notation, but long double a = long double (b) does not work, I
> consequently cast implicitly between the both.

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.

> Compiling: x.cpp
> In function `double intconv<double>(double>':
> x.cpp (9) Error: instantiated from here
> x.cpp (3) Warning:  initialization to `int' from `double'

If you don't like strongly typed languages, don't use C++.

- Raw text -


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