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] | |
For example, in the Ada standard, if you write
a := x / y;
where y is 1.0, and Machine_Overflows is false for the floating-point type in question, then the result is "unspecified". This means that the compiler could generate code to send denial-of-service-attacks to the internet root servers, and you would not be violating the standard, but you would not get many customers for your compiler. What users would expect here on an IEEE machine is to get infinities, even though the Ada RM says nothing about this possibility.
I am not an Ada programmer, but if this is division like I think it is, I don't understand why you would expect machine overflow by dividing by one. Or is this a typo where you meant "where y is 0.0"?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |