Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Bug in gmp header file

Subject: CGAL users discussion list

List archive

[cgal-discuss] Bug in gmp header file


Chronological Thread 
  • From: Gopichand Paturi <>
  • To:
  • Subject: [cgal-discuss] Bug in gmp header file
  • Date: Thu, 13 Feb 2014 00:02:01 +0530

Hi All,

I found a small bug in the header file gmp.h in line 2177.
(I have installed GMP&MPFR for using it them in CGAL)

The bug being that negative value being assigned to unsigned type, though this a subtle error I wanted to report it.

Error: unary minus operator applied to unsigned type, result still unsigned
This is what I got when I compiled my project.

Well, I am reporting this to GNU(as this is their code) as well, but I am sending this so that everyone can change the header file for correct output.

Thanks& Regards
Gopichand,
BITS PILANI , India
// Copyright (c) 2010 GeometryFactory (France). All rights reserved.
// 
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
// 
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// 
// $URL$
// $Id$
// 
// Author: Andreas Fabri

#ifndef CGAL_GMP_H
#define CGAL_GMP_H 1

#include <CGAL/config.h>

#if defined(BOOST_MSVC)
#  pragma warning(push)
#  pragma warning(disable:4244 4146) // conversion with loss of data
                                     // warning on - applied on unsigned number
#endif

//#include "gmp.h"


#if defined(BOOST_MSVC)
#  pragma warning(pop)
#endif

#endif // CGAL_GMP_H



Archive powered by MHonArc 2.6.18.

Top of Page