- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I posted this question yesterday with some example compiler flags but the message got flagged as spam (to many dashes and slashes?) so I will more carefully word my question today. (PS it may be wise not to flag messages with lots of dashes as spam in a compiler support forum!)
The latest oneapi c++ compiler will now optimize out a check of "this" being nullptr in a class member. This is likely following gcc and the language standard which indicates that a call to a member should never be done on nullptr. However legacy code can often use this check of "this == nullptr" to catch such calls.
Previous Intel C++ and current MS VS C++ do not automatically remove this test in optimization. gcc has a flag (add dashes) "no delete null pointer checks" to turn off this optimization.
What is the flag to use for Intel C++ to turn off this optimization?
Link Copied

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