On 27/02/2020 22:52, Kern Sibbald wrote:
Hello Phil,

Your suggestion is now applied and is in the git repo.  It will be released in the next version.  If you get a chance, please pull the repo and let me know if the problem is resolved.

Thanks,

Kern

On 2/26/20 6:32 PM, Phil Stracchino wrote:
On 2020-02-26 10:55, Kern Sibbald wrote:
Hello Phil,

It appears to me that the Solaris compiler is generating errors for
functions that are virtual and thus overloaded.

Well, warnings, not errors.

The first one looks like it's running into something Bacula already
tries to correct for, but the cprrection is perhaps out of date:


/* Define to the equivalent of the C99 'restrict' keyword, or to
    nothing if this is not supported.  Do not define if restrict is
    supported directly.  */
#define restrict __restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
    __restrict__, even though the corresponding Sun C compiler ends up with     "#define restrict _Restrict" or "#define restrict __restrict__" in the
    previous line.  Perhaps some future version of Sun C++ will work with
    restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif



It looks like by Solaris Studio 12.3, __restrict__ IS already defined.
It seems a very simple fix for that is simply to wrap that '#define
__restrict__' in an '#ifndef __restrict__', as follows:


#if defined __SUNPRO_CC && !defined __RESTRICT
#define _Restrict
#ifndef __restrict__
#define __restrict__
#endif
#endif


This eliminates that warning with no apparent adverse effects. But I
note again, it's all only compiler *warnings*, no errors occur.


Back in March, 2019, I supplied this fix:
#if defined __SUNPRO_CC && __SUNPRO_CC < 0x5150

Pity it wasn't used then.

Cheers,
Gary B-)



_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to