Home » Community » U++ community news and announcements » Upp 2008.1beta2 v2 released
Re: Upp 2008.1beta2 v2 released [message #15225 is a reply to message #15216] |
Thu, 10 April 2008 15:02   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Thu, 10 April 2008 02:59 |
Sorry. I am not gonna to fix this. I am no slave of some idiot who does not remember that && has higher priority than || and thus adds such idiotic warning.
What will be next? What about (x * y) + 10?
The whole purpose of operator priorities is to reduce the number of parenthesis. Do you really think this code is more readable
return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || (c == '_');
|
Well, operator precedence warnings are (IMO) really not necessary, in particular for usual operator precedence rules.
I can see them useful only in few cases, as ternary operator ?:, but not on && and || which have well known precedence rules.
What I think we should make go away are other warnings :
1- unused variables. Those usually means that old/broken code is still present, or at least that code is still unpolished
2- missing return statement. That can hide nasty bugs too.
3- non virtual destructor on polymorphic classes. Well, in upp code style they may be not necessary, but can still bring bugs if classes are used in non-upp style code.
4- some automatic type conversions. In my experience, they can bring very difficult to find bugs.
5- un-initialized variables
6- some bad uses of references
7- other stuffs that now I don't remember 
I don't know which of those are still caught by upp default warning style, but I've seen that compiling it with -wall bring really tons of warnings....
BTW, working on an open source well established library, I just caught a bug just enabling a bit more warnings on it... si I think that making compiler a bit stricter can bring benefits.
Max
|
|
|
 |
|
Upp 2008.1beta2 v2 released
By: unodgs on Tue, 25 March 2008 23:52
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: Tom1 on Wed, 26 March 2008 09:55
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mirek on Wed, 26 March 2008 09:59
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mdelfede on Wed, 26 March 2008 20:34
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mr_ped on Mon, 07 April 2008 12:28
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mr_ped on Mon, 07 April 2008 12:37
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mr_ped on Tue, 08 April 2008 14:13
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mdelfede on Wed, 09 April 2008 10:30
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mirek on Thu, 10 April 2008 02:59
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mr_ped on Thu, 10 April 2008 09:33
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: unodgs on Thu, 10 April 2008 12:48
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mdelfede on Thu, 10 April 2008 15:02
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: bonami on Thu, 10 April 2008 05:13
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mirek on Thu, 10 April 2008 14:09
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: bonami on Fri, 11 April 2008 11:57
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: Tom1 on Thu, 10 April 2008 15:52
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mirek on Thu, 10 April 2008 17:44
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mr_ped on Tue, 03 June 2008 10:21
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mirek on Tue, 03 June 2008 13:54
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: zsolt on Tue, 03 June 2008 15:06
|
 |
|
Re: Upp 2008.1beta2 v2 released
By: mirek on Tue, 03 June 2008 18:38
|
Goto Forum:
Current Time: Mon Jul 07 11:35:16 CEST 2025
Total time taken to generate the page: 0.07429 seconds
|