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: [RFC] MIPS, use trap instead of break to detect divide by zero


Eric Christopher <echristo@redhat.com> writes:
> I'd prefer if we have to do this to have it as a switch that takes an
> option, perhaps -mdivide-check=(trap,break,none) and error out if we get
> something that doesn't match those. We could then deprecate the existing
> -mno-divide-check and save some option space.

Sorry to be argumentative, but I'd prefer two separate options.

If you have a kernel that understands the trap, it's unlikely you'll
deliberately compile some units with breaks and some with traps, then
link them together.  It seems more of a system-wide choice.  There might
even be a configure-time switch to select traps rather than breaks
(along the lines of --with-arch).

On the other hand, I think it's more usual to turn off divide
checks for individual files.

Plus it avoids the situation where we have two ways of specifying the
same thing and have to decide how the interact.  (Which is a problem
even if one of the ways is deprecated, although that does seem a bit
like unnecessary churn to me. ;)

Richard


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