-
Notifications
You must be signed in to change notification settings - Fork 871
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
Require C11 #12660
Require C11 #12660
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ since v1.0.0. | |
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
v6.0.x | ||
v5.0.x | ||
v4.1.x | ||
v4.0.x | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Open MPI v6.0.x series | ||
====================== | ||
|
||
This file contains all the NEWS updates for the Open MPI v6.0.x | ||
series, in reverse chronological order. | ||
|
||
Open MPI version v6.0.0 | ||
-------------------------- | ||
:Date: ...fill me in... | ||
|
||
- Open MPI now requires a C11-compliant compiler to build. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,22 @@ | |
* reserved. | ||
* Copyright (c) 2020 Research Organization for Information Science | ||
* and Technology (RIST). All rights reserved. | ||
* Copyright (c) 2024 Stony Brook University. All rights reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
/* needed for strsep() */ | ||
#define _DEFAULT_SOURCE | ||
#define _BSD_SOURCE | ||
|
||
/* needed for posix_memalign() and getopt() */ | ||
#define _POSIX_C_SOURCE 200809L | ||
|
||
#include "ompi_config.h" | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdio.h> | ||
|
@@ -50,19 +59,9 @@ static int do_ops[12] = { | |
static int verbose = 0; | ||
static int total_errors = 0; | ||
|
||
#define max(a, b) \ | ||
({ \ | ||
__typeof__(a) _a = (a); \ | ||
__typeof__(b) _b = (b); \ | ||
_a > _b ? _a : _b; \ | ||
}) | ||
|
||
#define min(a, b) \ | ||
({ \ | ||
__typeof__(a) _a = (a); \ | ||
__typeof__(b) _b = (b); \ | ||
_a < _b ? _a : _b; \ | ||
}) | ||
#define max(a, b) (a) > (b) ? (a) : (b) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But why ? The original code was correct, compliant with C11. Why changing it to a worst version ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
#define min(a, b) (a) < (b) ? (a) : (b) | ||
|
||
static void print_status(char *op, char *type, int type_size, int count, int max_shift, | ||
double *duration, int repeats, int correct) | ||
|
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.
How is this related to the scope of this PR (aka. require C11) ?
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.
typeof
is not C11.