This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Miscompilation of remainder expressions
- From: Roberto Bagnara <bagnara at cs dot unipr dot it>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 15 Jan 2007 14:53:52 +0100
- Subject: Miscompilation of remainder expressions
Reading the thread "Autoconf manual's coverage of signed integer
overflow & portability" I was horrified to discover about GCC's
miscompilation of the remainder expression that causes INT_MIN % -1
to cause a SIGFPE on CPUs of the i386 family. Are there plans to
fix this bug (which, to me, looks quite serious)?
All the best,
Roberto
P.S. I checked whether this bug affects my code and it does.
Before yesterday I was completely unsuspecting of such
a fundamental flaw... I wonder how many know about it.
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it