• Show log

    Commit

  • Hash : 86b1f082
    Author : Paul Eggert
    Date : 2015-10-30T13:45:26

    intprops: add WRAPV and const flavors for GCC 5
    
    If available, use GCC 5's builtin functions for efficient integer
    overflow checking.  Also, add macros like INT_ADD_WRAPV that efficently
    and safely compute the low-order bits of the correct answer.
    A downside of these efficient functions is that they cannot be
    used in constant expressions, so add macros like INT_CONST_ADD_OVERFLOW
    and INT_CONST_ADD_WRAPV that can be used even in constant expressions.
    * NEWS: Document the incompatible changes to INT_ADD_OVERFLOW etc.
    * doc/intprops.texi (Integer Properties, Integer Type Overflow):
    Document the changes.
    (Wraparound Arithmetic): New section.
    (Integer Range Overflow):
    Put this subsection last, since it's least useful.
    * lib/intprops.h (INT_CONST_ADD_OVERFLOW)
    (INT_CONST_SUBTRACT_OVERFLOW, INT_CONST_MULTIPLY_OVERFLOW):
    New macros, with the meaning that INT_ADD_OVERFLOW etc. used to have.
    (INT_CONST_ADD_WRAPV, INT_CONST_SUBTRACT_WRAPV)
    (INT_NEGATE_WRAPV, INT_CONST_MULTIPLY_WRAPV, INT_DIVIDE_WRAPV)
    (INT_REMAINDER_WRAPV, _GL_INT_OP_WRAPV, _GL_EXPR_CAST)
    (_GL_INT_OP_WRAPV_LONGISH, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
    (INT_MULTIPLY_WRAPV, _GL_OP_OVERFLOW, _GL_OP_WRAPV, _GL_OP_WRAPV_GENSYM):
    New macros.
    (INT_ADD_OVERFLOW, INT_SUBTRACT_OVERFLOW, INT_MULTIPLY_OVERFLOW):
    Generate calls to GCC builtins if available, for speed.
    * tests/test-intprops.c (INT_CONST_DIVIDE_OVERFLOW)
    (INT_CONST_REMAINDER_OVERFLOW, INT_CONST_LEFT_SHIFT_OVERFLOW)
    (INT_CONST_DIVIDE_WRAPV, INT_CONST_REMAINDER_WRAPV)
    (INT_CONST_LEFT_SHIFT_WRAPV): New macros.
    (main, CHECK_BINOP, CHECK_UNOP, CHECK_SUM, CHECK_PRODUCT)
    (CHECK_QUOTIENT, CHECK_REMAINDER):
    Test WRAPV and CONST flavors (when available) too.
    

  • README

  • Misc notes
    ----------
    
    regexprops-generic.texi is generated via a utility in findutils.
    
    How to update gnulib manual on www.gnu.org
    ------------------------------------------
    
    1) You need a non-anonymous checkout of the web pages directory.
    
       $ cvs -d :ext:jas@cvs.savannah.gnu.org:/web/gnulib \
             checkout gnulib
    
    2) Get familiar with the instructions for web page maintainers.
       http://www.gnu.org/server/standards/readme_index.html
       http://www.gnu.org/server/standards/README.software.html
       especially the note about symlinks.
    
    3) Assuming GNULIB_CHECKOUT refers to a checkout of the gnulib dir,
       and      GNULIB_WWW_CHECKOUT refers to the other directory created above (1),
       do
    
       GNULIB_WWW_CHECKOUT=`cd $GNULIB_WWW_CHECKOUT && pwd`
       cd $GNULIB_CHECKOUT/doc
       make updated-stamp
       ../build-aux/gendocs.sh -o "$GNULIB_WWW_CHECKOUT/manual" \
         gnulib "The GNU Portability Library"
       cd $GNULIB_WWW_CHECKOUT
    
       Verify that the result looks sane.
    
    4) Commit the modified and the new files.
    
    5) Find the files which have not been overwritten (because they belonged
       to sections that have been removed or renamed):
    
       $ cd manual/html_node
       $ ls -lt
    
       Remove these files and commit their removal to CVS.
       For each of these files, add a line to the file .symlinks. This will
       ensure that hyperlinks to the removed files will redirect to the entire
       manual; this is better than a 404 error.
    
    There is a problem with 'index.html' being written twice (once for POSIX
    function 'index', once for the table of contents); you can ignore this issue.