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


Is there a list of which compilers are supported and what versions recommeneded for building LO?

I was thinking of the feasibility of using gcc's __builtin_constant_p in a macro to differentiate fast and not so fast paths for createFromAscii cases to keep the code uniform but still get the optimizations, but then figured that would not work with Visual Studio.

Jani

Ex:

#include <stdio.h>

#define CONSTACTION(str) printf("%s is const\n", str)
#define VARACTION(str) printf("%s is not known to be const\n", str)

#define ACTION(str)  if (__builtin_constant_p(str)) {\
                        CONSTACTION(str); \
                    } else {\
                        VARACTION(str);\
                    }

int main(int argc, char *argv[]) {
    char *s = "ss";
    ACTION("cc");
    ACTION(s);
    return 0;
}


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.