Skip to content
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

Merged
merged 3 commits into from
Jan 30, 2018
Merged

Add __optnone__ attribute for Clang #4715

merged 3 commits into from
Jan 30, 2018

Conversation

rhc54
Copy link
Contributor

@rhc54 rhc54 commented Jan 15, 2018

Add the optnone attribute to help avoid optimizing out MPIR_Breakpoint

Signed-off-by: Ralph Castain rhc@open-mpi.org

Ralph Castain added 2 commits January 15, 2018 11:15
…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)

_OPAL_CHECK_SPECIFIC_ATTRIBUTE([extension],
[
#define FOO __extension__ ({size_t bar; bar = 3;})
Copy link
Member

@jsquyres jsquyres Jan 23, 2018

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)
Copy link
Member

@jsquyres jsquyres left a 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. 👍

@bwbarrett
Copy link
Member

bot:ompi:retest

1 similar comment
@hppritcha
Copy link
Member

bot:ompi:retest

@bwbarrett bwbarrett merged commit cfe72e0 into open-mpi:v3.0.x Jan 30, 2018
@rhc54 rhc54 deleted the cmr30/optnone branch February 23, 2018 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants