[sword-devel] make error
jaak at ristioja.ee
Mon Jul 4 15:43:36 MST 2016
IMHO, it were more beneficial to set these flags in the build system
(-Wall should enable -Wnonnull-compare anyway) than in the source code.
Setting these in a publicly visible header file without "#pragma
diagnostic push/pop" makes no sense to me...
On 05.07.2016 01:33, Greg Hellings wrote:
> The proper fix is to wrap that #pragma with a conditional guard so it
> only gets applied on GCC 6. I'm sure there are well-documented GCC
> preprocessor definitions that can be applied there, but Troy will need
> to commit the fix to SVN once he finds the appropriate guards that he
> wants to use.
> On Mon, Jul 4, 2016 at 6:28 PM, Daniel Hughes <trampster at gmail.com> wrote:
>> I commend the lines and after that make completed successfully.
>> Thanks for the help,
>> Daniel Hughes
>> On Tue, Jul 5, 2016 at 10:19 AM, Jaak Ristioja <jaak at ristioja.ee> wrote:
>>> Afaik, -Wnonnull-compare was added to GCC in version 6 (see
>>> https://gcc.gnu.org/gcc-6/porting_to.html ). But it seems that the
>>> source code in include/swobject.h unconditionally evaluates these
>>> pragmas, regardless of GCC version. This bug was introduced in SVN 3426.
>>> The most simple workaround is to delete or comment out these 2 #pragma
>>> On 05.07.2016 01:10, Daniel Hughes wrote:
>>>> I'm trying to build sword from svn by running the following commands:
>>>> make distclean
>>>> sudo make install
>>>> but am getting the following error running make:
>>>> ../include/swobject.h:31:32: error: unknown option after '#pragma GCC
>>>> diagnostic' kind [-Werror=pragmas]
>>>> #pragma GCC diagnostic warning "-Wnonnull-compare"
>>>> What am I doing wrong?
>>>> God bless,
>>>> Daniel Hughes
More information about the sword-devel