> -----Original Message-----
> From: Davi Arnaut [mailto:davi.arnaut@stripped]
> Sent: Wednesday, September 08, 2010 6:02 PM
> To: monty@stripped
> Cc: Vladislav Vaintroub; 'Roy Lyseng'; 'MARK CALLAGHAN'; 'Jay Pipes'; 'Guilhem
> Bichot'; 'internals'
> Subject: Re: [STYLE] use true/false in C++, not TRUE/FALSE
>
> On 9/8/10 12:40 PM, Michael Widenius wrote:
> No. Implicit integer conversion is quite common, no sane compiler will
> give such warning by default. Even if we activated it for MySQL code, it
> would be lost in a sea of warnings as MySQL code is quite crappy in this
> regard.
We should activate this warning if it is not by default, because
a) we appear to work with compilers that activate this error by default.
b) If we do not do that, it will take weeks next time to find a place where we lose
significant bits in such conversion. And, in
many cases it is simple to fix those warnings and avoid casting by just using correct
data types that do not cause narrowing
conversion.
As for the sea of warnings, we already had such a case ("...will break strict aliasing
rules"). You have shown that it is possible
to fix a sea of warnings and to silence the stupid compiler that produced those warnings,
within a quite short period of time:)
| Thread |
|---|
| • [STYLE] use true/false in C++, not TRUE/FALSE | Guilhem Bichot | 26 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Roy Lyseng | 26 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | MARK CALLAGHAN | 26 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Guilhem Bichot | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | MARK CALLAGHAN | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Guilhem Bichot | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Jay Pipes | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Davi Arnaut | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Jay Pipes | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Davi Arnaut | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | MARK CALLAGHAN | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Davi Arnaut | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | MARK CALLAGHAN | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Roy Lyseng | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | MARK CALLAGHAN | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Michael Widenius | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Jay Pipes | 8 Sep |
| • RE: [STYLE] use true/false in C++, not TRUE/FALSE | Vladislav Vaintroub | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Roy Lyseng | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Davi Arnaut | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Michael Widenius | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Davi Arnaut | 8 Sep |
| • RE: [STYLE] use true/false in C++, not TRUE/FALSE | Vladislav Vaintroub | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Michael Widenius | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Konstantin Osipov | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Mats Kindahl | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Tor Didriksen | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Mats Kindahl | 8 Sep |
| • RE: [STYLE] use true/false in C++, not TRUE/FALSE | Vladislav Vaintroub | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Mats Kindahl | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Tor Didriksen | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Mats Kindahl | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Jay Pipes | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Michael Widenius | 8 Sep |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | MARK CALLAGHAN | 31 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Mats Kindahl | 27 Aug |
| • Re: [STYLE] use true/false in C++, not TRUE/FALSE | Michael Widenius | 8 Sep |