https://bugs.freedesktop.org/show_bug.cgi?id=39631
--- Comment #6 from Stephan Bergmann <sbergman@redhat.com> ---
also note that GCC __builtin_expect (with its first parameter being of type
long) is plain, simple, and generally does not work as one would naively hope:
class C {
private:
struct S;
typedef void (S::* B)();
public:
operator B();
};
int f(C c) {
if (c) {
if (__builtin_expect(c, 1)) {
return 1;
} else {
return 2;
}
} else {
return 3;
}
}
will cause a compilation error "cannot convert ‘C’ to ‘long int’ for argument
‘1’ to ‘long int __builtin_expect(long int, long int)’"
--
You are receiving this mail because:
You are on the CC list for the bug.
Context
- [Bug 39631] add optimisation helpers · bugzilla-daemon
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.