Date: Thu, 1 Feb 2001 10:55:15 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Jason Green cc: djgpp AT delorie DOT com Subject: Re: Windows ME and DJGPP In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.