From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!80.239.136.19.MISMATCH!tsicnews.teliasonera.com!news.otenet.gr!news.grnet.gr!newsfd02.forthnet.gr!not-for-mail From: Ioannis Vranos Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada) Date: Sat, 05 Mar 2005 22:27:51 +0200 Organization: FORTHnet S.A., Atthidon 4, GR-17671 Kalithea, Greece, Tel: +30 2109559000, Fax: +30 2109559333, url: http://www.forthnet.gr Message-ID: <1110054476.533590@athnrd02> References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <87is4598pm.fsf@insalien.org> NNTP-Posting-Host: athnrd02.forthnet.gr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: athprx02.forthnet.gr 1110054477 24214 193.92.150.73 (5 Mar 2005 20:27:57 GMT) X-Complaints-To: abuse@forthnet.gr NNTP-Posting-Date: Sat, 5 Mar 2005 20:27:57 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en In-Reply-To: <87is4598pm.fsf@insalien.org> Cache-Post-Path: newsfd02!unknown@ppp36-adsl-149.ath.forthnet.gr Xref: g2news1.google.com comp.lang.ada:8674 comp.lang.c++:44212 comp.realtime:958 comp.software-eng:4489 Date: 2005-03-05T22:27:51+02:00 List-Id: Ludovic Brenta wrote: > It is true that, in ISO C++, loop variables declared in the for > statement are not visible outside the loop. However, the library I > was working on did make use of the loop variable after the loop, and > none of our 4 or 5 different C++ compilers complained about it. > > Which brings me to the general question: is there any > standard-compliant C++ compiler in existence? Or are compilers only > "mostly compliant" or "close enough" or some other ill-defined term? int main() { for(int i=0; i<10; ++i) ; i=7; } C:\c>g++ temp.cpp -o temp.exe temp.cpp: In function `int main()': temp.cpp:6: error: name lookup of `i' changed for new ISO `for' scoping temp.cpp:3: error: using obsolete binding at `i' C:\c> C:\c>cl temp.cpp Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.41013 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. temp.cpp temp.cpp(6) : error C2065: 'i' : undeclared identifier C:\c> -- Ioannis Vranos http://www23.brinkster.com/noicys