This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Miscompilation of remainder expressions


David Daney wrote:
MIPS does *not* seem to suffer from this 'defect', [...]

In my opinion, if this is not a defect, then the only thing that needs to be done is writing a few lines in some "Known Issues" section of the documentation. This because, at least for me, standard conformance is the first and foremost value. By the way, I was not able to find the C Standard Defect Report concerning this issue: do you have a pointer? It would be interesting to have the advice of someone who is in the standardization commitee.

So, a possible plan for dealing with this issue could be:

  document it so that users can know about it;
  when the standard has been clarified
    if the standard implies INT_MIN % -1 should give 0
      resume the discussion about how to implement that;
      resume the discussion about the default behavior of GCC
    else
      do nothing

--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]