octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60316] New warnings, errors showing up during


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #60316] New warnings, errors showing up during compilation
Date: Tue, 6 Apr 2021 14:40:50 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #60316 (project octave):

                  Status:               Confirmed => Ready For Test         

    _______________________________________________________

Follow-up Comment #22:

I updated gnulib with this changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/0cf53a415b7f

Then I noticed that intprops-wrappers.c did not include config.h.  Although
intprops-wrappers.h does include octave-config.h, that just provides a small
subset of the configuration settings that are in config.h and some definitions
provided by config.h may be needed for the gnulib macros to work properly.  So
I fixed that with this changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/6f353cc08d75

Then when I tried building with GCC 6, I still saw messages like this:


/home/jwe/src/octave/libgnu/intprops.h:609:22: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
       : (tmax) / (b) < (a)))
                      ^
/home/jwe/src/octave/libgnu/intprops.h:534:4: note: in expansion of macro
‘_GL_INT_MULTIPLY_RANGE_OVERFLOW’
   (overflow (a, b, tmin, tmax) \
    ^~~~~~~~
/home/jwe/src/octave/libgnu/intprops.h:512:11: note: in expansion of macro
‘_GL_INT_OP_CALC’
         : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
           ^~~~~~~~~~~~~~~
/home/jwe/src/octave/libgnu/intprops.h:505:7: note: in expansion of macro
‘_GL_INT_OP_WRAPV_LONGISH’
     : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
       ^~~~~~~~~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libgnu/intprops.h:416:4: note: in expansion of macro
‘_GL_INT_OP_WRAPV’
    _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
    ^~~~~~~~~~~~~~~~
/home/jwe/src/octave/liboctave/wrappers/intprops-wrappers.c:56:10: note: in
expansion of macro ‘INT_MULTIPLY_WRAPV’
   return INT_MULTIPLY_WRAPV (a, b, r);
          ^~~~~~~~~~~~~~~~~~


so I added a #pragma to silence the warning in this changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/8f1cf32ada13

If other compiler versions produce other warnings, then go ahead and include
additional #pragma lines for them in the intprops-wrappers.c file.

Note that we have our own macro to decide whether to use the "#pragma GCC
diagnostic" lines.  I don't know why the gnulib sources are using "4 <
__GNUC__ + (3 <= __GNUC_MINOR__)" because the GCC release notes say that
"#pragma GCC diagnostic" was added in GCC 4.6.0.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60316>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]