delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | Dong Soo Kim <dsk666 AT cse DOT unsw DOT EDU DOT AU> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | g++ Warnings |
Date: | Sat, 30 Mar 2002 09:28:45 +1100 |
Organization: | The University of New South Wales |
Lines: | 24 |
Message-ID: | <Pine.GSO.4.44.0203300924240.24668-100000@hummel.orchestra.cse.unsw.EDU.AU> |
NNTP-Posting-Host: | hummel.orchestra.cse.unsw.edu.au |
Mime-Version: | 1.0 |
X-Trace: | tomahawk.unsw.edu.au 1017440824 21643 129.94.242.21 (29 Mar 2002 22:27:04 GMT) |
X-Complaints-To: | abuse AT unsw DOT edu DOT au |
NNTP-Posting-Date: | Fri, 29 Mar 2002 22:27:04 +0000 (UTC) |
X-X-Sender: | dsk666 AT hummel DOT orchestra DOT cse DOT unsw DOT EDU DOT AU |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hi all, 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. The simple test program was : int main() { int x=x; return 0; } Compiles perfectly. Not complaining, just wondering if it's something overlooked in g++ Thanks DSK
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |