List:Internals« Previous MessageNext Message »
From:Vladislav Vaintroub Date:September 8 2010 4:38pm
Subject:RE: [STYLE] use true/false in C++, not TRUE/FALSE
View as plain text  

> -----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/FALSEGuilhem Bichot26 Aug
  • Re: [STYLE] use true/false in C++, not TRUE/FALSERoy Lyseng26 Aug
  • Re: [STYLE] use true/false in C++, not TRUE/FALSEMARK CALLAGHAN26 Aug
    • Re: [STYLE] use true/false in C++, not TRUE/FALSEGuilhem Bichot31 Aug
      • Re: [STYLE] use true/false in C++, not TRUE/FALSEMARK CALLAGHAN31 Aug
        • Re: [STYLE] use true/false in C++, not TRUE/FALSEGuilhem Bichot31 Aug
          • Re: [STYLE] use true/false in C++, not TRUE/FALSEJay Pipes31 Aug
            • Re: [STYLE] use true/false in C++, not TRUE/FALSEDavi Arnaut31 Aug
              • Re: [STYLE] use true/false in C++, not TRUE/FALSEJay Pipes31 Aug
                • Re: [STYLE] use true/false in C++, not TRUE/FALSEDavi Arnaut31 Aug
                  • Re: [STYLE] use true/false in C++, not TRUE/FALSEMARK CALLAGHAN31 Aug
                    • Re: [STYLE] use true/false in C++, not TRUE/FALSEDavi Arnaut31 Aug
                      • Re: [STYLE] use true/false in C++, not TRUE/FALSEMARK CALLAGHAN31 Aug
                        • Re: [STYLE] use true/false in C++, not TRUE/FALSERoy Lyseng31 Aug
                          • Re: [STYLE] use true/false in C++, not TRUE/FALSEMARK CALLAGHAN31 Aug
                            • Re: [STYLE] use true/false in C++, not TRUE/FALSEMichael Widenius8 Sep
                              • Re: [STYLE] use true/false in C++, not TRUE/FALSEJay Pipes8 Sep
                          • RE: [STYLE] use true/false in C++, not TRUE/FALSEVladislav Vaintroub31 Aug
                            • Re: [STYLE] use true/false in C++, not TRUE/FALSERoy Lyseng31 Aug
                            • Re: [STYLE] use true/false in C++, not TRUE/FALSEDavi Arnaut31 Aug
                              • Re: [STYLE] use true/false in C++, not TRUE/FALSEMichael Widenius8 Sep
                                • Re: [STYLE] use true/false in C++, not TRUE/FALSEDavi Arnaut8 Sep
                                  • RE: [STYLE] use true/false in C++, not TRUE/FALSEVladislav Vaintroub8 Sep
                        • Re: [STYLE] use true/false in C++, not TRUE/FALSEMichael Widenius8 Sep
                      • Re: [STYLE] use true/false in C++, not TRUE/FALSEKonstantin Osipov8 Sep
                        • Re: [STYLE] use true/false in C++, not TRUE/FALSEMats Kindahl8 Sep
                          • Re: [STYLE] use true/false in C++, not TRUE/FALSETor Didriksen8 Sep
                            • Re: [STYLE] use true/false in C++, not TRUE/FALSEMats Kindahl8 Sep
                              • RE: [STYLE] use true/false in C++, not TRUE/FALSEVladislav Vaintroub8 Sep
                                • Re: [STYLE] use true/false in C++, not TRUE/FALSEMats Kindahl8 Sep
                              • Re: [STYLE] use true/false in C++, not TRUE/FALSETor Didriksen8 Sep
                                • Re: [STYLE] use true/false in C++, not TRUE/FALSEMats Kindahl8 Sep
                  • Re: [STYLE] use true/false in C++, not TRUE/FALSEJay Pipes31 Aug
        • Re: [STYLE] use true/false in C++, not TRUE/FALSEMichael Widenius8 Sep
      • Re: [STYLE] use true/false in C++, not TRUE/FALSEMARK CALLAGHAN31 Aug
  • Re: [STYLE] use true/false in C++, not TRUE/FALSEMats Kindahl27 Aug
    • Re: [STYLE] use true/false in C++, not TRUE/FALSEMichael Widenius8 Sep