https://bugs.freedesktop.org/show_bug.cgi?id=53061

             Bug #: 53061
           Summary: Stop assuming NULL for C++ is an integral type
    Classification: Unclassified
           Product: LibreOffice
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Libreoffice
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Now LibreOffice uses gnu++0x mode for C++ compilation if available, we should
stop assuming NULL for C++ is an integral type (e.g., 0L) because some
platforms rightfully define it as nullptr.  For example, recent FreeBSD defines
NULL like this:

#if !defined(__cplusplus)
#define NULL    ((void *)0)
#else
#if __cplusplus >= 201103L
#define NULL    nullptr
#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
#define NULL    __null
#else
#if defined(__LP64__)
#define NULL    (0L)
#else
#define NULL    0
#endif  /* __LP64__ */
#endif  /* __GNUG__ */
#endif  /* !__cplusplus */

With GCC 4.7+ (and Clang 3.2+), __cplusplus is correctly defined as 201103L and
it is causing lots of build issues with these new C++ compilers.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to