delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
Date: | Sat, 30 Mar 2002 11:22:57 +0300 |
From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | djgpp AT delorie DOT com |
Message-Id: | <2561-Sat30Mar2002112257+0300-eliz@is.elta.co.il> |
X-Mailer: | emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 |
CC: | Dong Soo Kim <dsk666 AT cse DOT unsw DOT EDU DOT AU> |
In-reply-to: | <Pine.GSO.4.44.0203300924240.24668-100000@hummel.orchestra.cse.unsw.EDU.AU> |
(message from Dong Soo Kim on Sat, 30 Mar 2002 09:28:45 +1100) | |
Subject: | Re: g++ Warnings |
References: | <Pine DOT GSO DOT 4 DOT 44 DOT 0203300924240 DOT 24668-100000 AT hummel DOT orchestra DOT cse DOT unsw DOT EDU DOT AU> |
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: Dong Soo Kim <dsk666 AT cse DOT unsw DOT EDU DOT AU> > Newsgroups: comp.os.msdos.djgpp > Date: Sat, 30 Mar 2002 09:28:45 +1100 > > I was just reading Stroustrup's book on C++ (3rd ed) and in it he says > that "int x=x;" should produce a warning in good compilers. > > Then to my surprise I found that g++ doesn't (both in MingW and Djgpp), > and silently ignores it. It would be a very Bad Idea (tm) for GCC to flag those cases, since they are widely used to shut up compiler warnings about variables which the compiler things are used before they are initialized. (Compilers can err about this because they don't understand what range of values can certain variables have, and thus don't know what conditions could fire under what circumstances.)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |