gnucash master: Multiple changes pushed

Sumit Bhardwaj bhardwajs at gmail.com
Sat Jul 5 02:43:45 EDT 2014


Just a quick note on my problems with compiling master today with
Wno-non-literal-null-conversion.

Compile kept on failing with the error message "gcc error: unrecognized
command line option" referring to the Wno-non-literal-null-conversion flag.
My gcc version is 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC)

Commenting out this warning gave me a clean build. For now, I have
commented this in my local gnucash and in the local github directory.
#AX_CHECK_COMPILE_FLAG([-Wno-non-literal-null-conversion],
#    [AM_CFLAGS="${AM_CFLAGS} -Wno-non-literal-null-conversion"],
#    [], [-Werror])

gcc man page doesn't list this warning as an option either. Not sure what's
going on. Will try to look tomorrow.

Thanks,
Sumit

P.S. - maint had same problem.

On Fri, Jul 4, 2014 at 7:30 AM, Geert Janssens <janssens-geert at telenet.be>
wrote:

> On Friday 04 July 2014 03:03:27 jralls at ceridwen.us wrote:
> > > On July 3, 2014 at 5:22 PM Geert Janssens <janssens-geert at telenet.be>
> wrote:
> > >  On Thursday 03 July 2014 20:07:46 John Ralls wrote:
> > >  > On Jul 3, 2014, at 7:25 PM, Geert Janssens
> > >  > <janssens-geert at telenet.be>>  >
> > >  > wrote:
> > >  > > Same issue but this time it may need some more careful testing.
> > >  > > TXN_TYPE_NONE may be used in other locations where '\0' is
> > >  > > assumed
> > >  > > instead of NULL (guile comes to mind). I don't have time to go
> > >  > > deeper into this right now so I'll just revert back to gcc for
> > >  > > the
> > >  > > time being.
> > >  > >
> > >  > > John, you don't *have* to fix this while you're on holidays :).
> > >  > > There is an easy alternative and you can revisit it later if
> > >  > > you
> > >  > > like.
> > >  > >
> > >  > > Oh, just a side question: do we want maint to be buildable with
> > >  > > clang as well ? If so we may need to backport (cherry-pick) the
> > >  > > current round of fixes.
> > >  >
> > >  > Maybe you should just add -Wno-non-literal-null-conversion to
> > >  > CFLAGS.
> > >  > Copy the code I wrote yesterday for -Wno-deprecated-register
> > >  > without
> > >  > the AC_LANG([C++]) block.
> > >
> > >  I could do that but prefer not to until we know for sure the
> > >  warning is>
> > > irrelevant. I can imagine clang doesn't throw this warning just for
> > > fun. Perhaps what we did was generally accepted before but is now
> > > considered risky ? I don't know. If we can avoid the warnings by
> > > small code modifications I'd prefer that approach.
> <snip>
> >
> > That's one way of looking at it, though there have been complaints
> > that Clang enforces a particular coding style via somewhat bogus
> > errors and warnings. In C 0, '\0', FALSE, and NULL are just different
> > ways of saying the same thing; in C++11 we should say nullptr when we
> > mean a null pointer, but for C code I think it's an unnecessary
> > exercise to go through the code to make sure we always use NULL.
> >
> With that you just did the analysis I was suggesting. I think you are
> right that in this case
> the warning is just too cautious and not useful in our code.
>
> So I have chosen to disable it (on condition the current compiler
> understands it) as you
> proposed.
>
> The maint backporting still needs to be done though.
>
> Geert
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>


More information about the gnucash-devel mailing list