Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit e46035b

Browse files
committed
Merge pull request #991 from jsquyres/pr/v2.0.0/cxx11-has-jumped-the-shark
v2.0.0: cxx: "rank" is now a function in C++11
2 parents 4662bc4 + 9501f45 commit e46035b

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

ompi/mpi/cxx/comm_inln.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// University of Stuttgart. All rights reserved.
1111
// Copyright (c) 2004-2005 The Regents of the University of California.
1212
// All rights reserved.
13-
// Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
13+
// Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
1414
// Copyright (c) 2011 FUJITSU LIMITED. All rights reserved.
1515
// $COPYRIGHT$
1616
//
@@ -271,9 +271,9 @@ MPI::Comm::Get_size() const
271271
inline int
272272
MPI::Comm::Get_rank() const
273273
{
274-
int rank;
275-
(void)MPI_Comm_rank (mpi_comm, &rank);
276-
return rank;
274+
int myrank;
275+
(void)MPI_Comm_rank (mpi_comm, &myrank);
276+
return myrank;
277277
}
278278

279279
inline int

ompi/mpi/cxx/group_inln.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// University of Stuttgart. All rights reserved.
1111
// Copyright (c) 2004-2005 The Regents of the University of California.
1212
// All rights reserved.
13+
// Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
1314
// $COPYRIGHT$
1415
//
1516
// Additional copyrights may follow
@@ -32,9 +33,9 @@ MPI::Group::Get_size() const
3233
inline int
3334
MPI::Group::Get_rank() const
3435
{
35-
int rank;
36-
(void)MPI_Group_rank(mpi_group, &rank);
37-
return rank;
36+
int myrank;
37+
(void)MPI_Group_rank(mpi_group, &myrank);
38+
return myrank;
3839
}
3940

4041
inline void

ompi/mpi/cxx/topology_inln.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// All rights reserved.
1313
// Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
1414
// Copyright (c) 2011 FUJITSU LIMITED. All rights reserved.
15+
// Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
1516
// $COPYRIGHT$
1617
//
1718
// Additional copyrights may follow
@@ -81,9 +82,9 @@ MPI::Cartcomm::Get_topo(int maxdims, int dims[], bool periods[],
8182
inline int
8283
MPI::Cartcomm::Get_cart_rank(const int coords[]) const
8384
{
84-
int rank;
85-
(void)MPI_Cart_rank(mpi_comm, const_cast<int *>(coords), &rank);
86-
return rank;
85+
int myrank;
86+
(void)MPI_Cart_rank(mpi_comm, const_cast<int *>(coords), &myrank);
87+
return myrank;
8788
}
8889

8990
inline void

opal/include/opal_stdint.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* All rights reserved.
1313
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
1414
* reserved.
15+
* Copyright (c) 2016 Research Organization for Information Science
16+
* and Technology (RIST). All rights reserved.
1517
* $COPYRIGHT$
1618
*
1719
* Additional copyrights may follow
@@ -52,7 +54,7 @@ typedef uint128_t opal_uint128_t;
5254
/* Clang won't quietly accept "-pedantic", but GCC versions older than ~4.8
5355
* won't quietly accept "-Wpedanic". The whole "#pragma GCC diagnostic ..."
5456
* facility only was added to GCC as of version 4.6. */
55-
#if defined(__clang__)
57+
#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 6)
5658
#pragma GCC diagnostic ignored "-Wpedantic"
5759
#else
5860
#pragma GCC diagnostic ignored "-pedantic"

0 commit comments

Comments
 (0)