-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add __optnone__ attribute for Clang #4715
Conversation
…point Thanks to @kiranchandramohan for the suggestion Signed-off-by: Ralph Castain <rhc@open-mpi.org> (cherry picked from commit 5c4185a)
See how the various compilers handle these Signed-off-by: Ralph Castain <rhc@open-mpi.org> (cherry picked from commit db8ebd3)
config/opal_check_attributes.m4
Outdated
|
||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([extension], | ||
[ | ||
#define FOO __extension__ ({size_t bar; bar = 3;}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think that this check does anything. It just tests to see whether #define FOO ...
compiles or not, which, since it's just defining a preprocessor macro, will always succeed.
Am I missing something? 🤔
Per https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#index-_005f_005fextension_005f_005f, use __extension__ in a C statement that will actually verify if the compiler supports it or not. Signed-off-by: Jeff Squyres <jsquyres@cisco.com> (cherry picked from commit ff31da6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added cherry-pick of ff31da6 from master. 👍
bot:ompi:retest |
1 similar comment
bot:ompi:retest |
Add the optnone attribute to help avoid optimizing out MPIR_Breakpoint
Signed-off-by: Ralph Castain rhc@open-mpi.org