- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
According to the documentation:
Tells the compiler to disable speculation if there is a possibility that the speculation may cause a floating-point exception
According to my tests it looks as if the behavior of this option purely depends on the status of the -fpe flag.
E.g
- when -fpe0 is used then it falls back to speculation= strict.
- when -fpe1|3 is used then it falls back to speculation= fast.
Can someone please confirm that this is the case. Does the option have other effect than this?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
speculation-safe is intended to avoid exceptions due to executing code outside a "false" conditional e.g. when both branches of an if are executed, or a loop invariant is calculated for a zero trip loop. . -fp-model strict would set speculation-safe so as to enable sane use of IEEE exceptions. The compiler manual gives much more complete descriptions of -fp-model strict and -fpe0 than any post here. Apparently, either of those options implies a non-default setting of -fp-speculation and fast-transcendentals.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page