This is the mail archive of the gcc-bugs@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]

[Bug c/15532] New:


I think the documentation of the mmix -mknuthdiv option in the "MMIX
Options" node of the gcc manual could be clarified a little.

Environment:
System: Linux blah 2.4.25-1-k6 #1 Tue Feb 24 13:18:52 EST 2004 i586 GNU/Linux
Architecture: i586
	<machine, os, target, libraries (multiple lines)>
host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib,gtk --enable-objc-gc i486-linux

How-To-Repeat:
If I understand the wording "Make the result of a division yielding a
remainder have the same sign as the divisor", -mknuthdiv is a "floor"
style division.  I think it may be clearer to say that outright,
something like: ... "floor" style division, meaning quotient rounded
towards negative infinity and remainder therefore having the same sign
as the divisor.

Also, I think it would be worth noting that this style is contrary to
the C99 standard (sec 6.5.5 in a draft I'm looking at).  I guess
either an explicit caution about (non)-conformance, or change the
wording "almost exclusively used" for -mno-knuthdiv to something
stronger.

-- 
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: user42 at zip dot com dot au
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15532


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