Changeset 94fe43 in git


Ignore:
Timestamp:
Jan 25, 2013, 10:09:01 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3720ae8bfcff4a4649ee98a15552089151d2d59b')
Children:
39e070d960bd0ab6d36b34b34c868cd1085371e5
Parents:
5efd81570bd3d8921d3bf3272bb1214556bf665f
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-01-25 22:09:01+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-01-28 18:21:51+01:00
Message:
Fix: (for 32-bit builds): libpolys/misc/intvec.cc should be compiled with "-fwrapv"

This option instructs the compiler to assume that signed arithmetic
overflow of addition, subtraction and multiplication wraps around
using twos-complement representation. This flag enables some
optimizations and disables others.

See http://gcc.gnu.org/onlinedocs/gcc-4.4.6/gcc/Code-Gen-Options.html
Location:
libpolys/misc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/misc/Makefile.am

    r5efd81 r94fe43  
    1 CXXTEMPLFLAGS      =-ftrapv 
    2 ## -fno-implicit-templates
     1CXXTEMPLFLAGS      =-ftrapv -fno-implicit-templates
    32
    43AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/..
     
    1312libmiscdir = $(libdir)/singular
    1413
     14
    1515libmisc_la_CFLAGS   = -O3 -fomit-frame-pointer ${PIPE}
    1616libmisc_g_la_CFLAGS = ${PIPE}
     
    2323libmisc_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
    2424
    25 SOURCES  = intvec.cc int64vec.cc options.c
     25
     26noinst_LTLIBRARIES = libintvec.la libintvec_g.la
     27
     28libmisc_la_LIBADD = libintvec.la
     29libmisc_g_la_LIBADD = libintvec_g.la
     30
     31
     32SOURCES  = int64vec.cc options.c
    2633libmisc_la_SOURCES   = $(SOURCES)
    2734libmisc_g_la_SOURCES = $(SOURCES)
     
    3643
    3744
     45libintvec_la_SOURCES = intvec.cc
     46libintvec_g_la_SOURCES = ${libintvec_la_SOURCES}
    3847
    3948
     49libintvec_la_CXXFLAGS = -O3 -fomit-frame-pointer ${PIPE} -fwrapv -fno-implicit-templates
     50libintvec_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} -fwrapv -fno-implicit-templates
     51
     52libintvec_la_CPPFLAGS   = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
     53libintvec_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
     54
  • libpolys/misc/intvec.cc

    r5efd81 r94fe43  
    88#define INTVEC_CC
    99
     10
    1011#include "config.h"
    1112#include <misc/auxiliary.h>
     
    1516#include <misc/options.h>
    1617#include <omalloc/omalloc.h>
     18
     19#pragma GCC push_options
     20#pragma GCC optimize ("wrapv")
    1721
    1822/*0 implementation*/
     
    804808}
    805809
     810#pragma GCC pop_options
     811
    806812#endif
Note: See TracChangeset for help on using the changeset viewer.