This is the mail archive of the 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: Fix libgomp Fortran tests

Paul Brook wrote:
[> quoting Brooks Moses]
[>> quoting Jerry DeLisle]
To avoid the runtime penalty in computations of checking for that absurd
case, I think its better to just not allow it and stick with the standard
which defines symmetrical integers.

But, if you restrict the set of permitted integer values to a symmetric set, then by that same logic (and application of 7.1.7, "The execution of any numeric operation whose result is not defined by the arithmetic used by the processor is prohibited."), the subtraction operator should throw a runtime error on HUGE(I)-1.

There is no requirement for a runtime error. The prohibition you mention above is a requirement placed on the user writing the code, not the compiler.

Right. As I said three paragraphs down. :)

But Jerry was saying that, despite the lack of explicit requirement, ABS() should throw a runtime error on ABS(HUGE(I)-1) -- and that this was sufficient reason to not allow HUGE(I)-1 in the set of legal integers, because the runtime error checking would be too expensive. I was merely refuting that logic on its own terms.

- Brooks

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