This is the mail archive of the gcc-patches@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] |
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.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |