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!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!irazu.switch.ch!switch.ch!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: Class hierarchy of exceptions (Ada, C++) Date: Mon, 28 Mar 2005 19:37:56 +0300 Organization: FORTHnet S.A., Atthidon 4, GR-17671 Kalithea, Greece, Tel: +30 2109559000, Fax: +30 2109559333, url: http://www.forthnet.gr Message-ID: <1112027876.946645@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> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <1111607633.301232.62490@z14g2000cwz.googlegroups.com> <87oed6wvyx.fsf_-_@insalien.org> <1111876424.201726@athnrd02> <874qewvycq.fsf@insalien.org> <1112011700.94455@athnrd02> <1112026943.872889@athnrd02> 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 1112027877 2246 193.92.150.73 (28 Mar 2005 16:37:57 GMT) X-Complaints-To: abuse@forthnet.gr NNTP-Posting-Date: Mon, 28 Mar 2005 16:37:57 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <1112026943.872889@athnrd02> Cache-Post-Path: newsfd02!unknown@ppp14-adsl-46.ath.forthnet.gr Xref: g2news1.google.com comp.lang.ada:10077 comp.lang.c++:47623 comp.realtime:1782 comp.software-eng:5417 Date: 2005-03-28T19:37:56+03:00 List-Id: Ioannis Vranos wrote: > Actually most compilers provide warnings for lots of stuff and provide > an option to display all warnings (e.g. /Wall), even comparison between > signed and unsigned integers generates a warning. And they can also > treat all warnings as *errors* if you specify so. > > However the default is to display warnings for anything that is not > required by the standard to be treated as an error, and compile it. > > > In most cases, one fixes *all* warnings. However there *are* some cases > where the programmer knows better. > > C++ is enabling by default, which I suppose is the opposite direction of > Ada, and that's why I think we can't understand one another. :-) > > > C++ being less restrictive as the default, doesn't mean a compiler does > not generate lots of warnings! An example. First compile with the default behaviour, then with all warnings turned on: int main() { int i=0; unsigned j=4; jg++ temp.cpp -o temp.exe C:\c>g++ -Wall temp.cpp -o temp.exe temp.cpp: In function `int main()': temp.cpp:7: warning: comparison between signed and unsigned integer expressions temp.cpp:7: warning: statement has no effect C:\c> -- Ioannis Vranos http://www23.brinkster.com/noicys [I am using 90 characters word-wrapping - (800/640) *72= 90 or better described as: (800/640) *80 - 10 for quotation= 90. If someone finds it inconvenient, please let me know].