Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On Friday 18 of January 2013, julien2412 wrote:
Hello,

On pc Debian x86-64 with master sources after having runned "make clean",
I've got this:
/home/julien/compile-libreoffice/libo/sal/qa/rtl/strings/test_strings_value
x.cxx: In instantiation of ‘void testInt() [with T = rtl::OUString]’:
/home/julien/compile-libreoffice/libo/sal/qa/rtl/strings/test_strings_value
x.cxx:77:28: required from here
/home/julien/compile-libreoffice/libo/sal/qa/rtl/strings/test_strings_value
x.cxx:48:5: error: passing ‘unsigned char’ chooses ‘int’ over ‘unsigned int’
[-Werror=sign-promo]

 -Wsign-promo is a rather pointless warning these days (the section in the gcc 
manpage is a funny read and not only because it talks about Cfront). I've 
added more overloads to silence it, but I rather wonder why we have this 
explicitly enabled at all.

 My hypothesis is like this:
- the idea behind the warning is just nonsense (who cares to what integer type 
the value is promoted)
- but it incidentally triggers when passing bool to SvStream, because it 
doesn't have any overload for operator<<(bool), and int is chosen over 
unsigned char AKA sal_Bool , so Caolan added it in 
e8bbb76827dd7a0e30d7d1db34a812a84d85f390
- if SvStream gets overload for bool, the warning can be dumped

 Or am I missing something there?

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.