Validate requested completions against the events supported by an operation

Issue #151 resolved
Amir Kamil created an issue

The UPC++ implementation does not detect when a requested completion event is not in the set supported by an operation. For example, the following compiles:

#include <upcxx/upcxx.hpp>

using namespace upcxx;

int main() {
  global_ptr<int> dst;
  rput(3, dst, source_cx::as_future());
}

The spec states that this is UB, but we should really provide a diagnostic, since it's likely something users might do by accident.

Comments (6)

  1. Paul Hargrove

    In the meeting today John mentioned that compile-time detection is potentially a bad idea since the erroneous usage may be in unreachable code.

  2. Log in to comment