Commit e88b197
committed
mpi.h: Move stdint header inclusion outside of extern C block
In C++ mode we try to include <cstdint> so we can annotate fixed-width
integer types, but doing so within an extern C block can cause an
error. Move these header includes outside of extern C to avoid the
issue. Observed on macOS with Xcode 16.2 and CXXFLAGS=-std=gnu++20:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__assertion_handler:29:1: error: templates must have C++ linkage
29 | template <class T>
| ^~~~~~~~~~~~~~~~~~
./src/include/mpi.h:60:1: note: extern "C" language linkage specification begins here
60 | extern "C" {
| ^
1 error generated.1 parent f763d57 commit e88b197
1 file changed
+18
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
80 | 98 | | |
81 | 99 | | |
82 | 100 | | |
| |||
105 | 123 | | |
106 | 124 | | |
107 | 125 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments