Defect Report #425

Previous Defect Report < - > Next Defect Report


Submitter: Jens Gustedt
Submission Date: 2012-10-08
Source: WG14
Reference Document: N1653
Version: 1.1
Date: April 2013
Subject: no specification for the access to variables with temporary lifetime

Summary

Section 6.2.4 in p4 and p5 requires implementation defined behavior for accessing objects with thread local or automatic storage from different threads than where they are defined. No such mention is done for objects with temporary lifetime in p8. Can they be accessed by other threads? Is this property handled similar to the property for automatic storage duration? Or should this simply be forbidden?

Suggested Technical Corrigendum

Add to the end of 6.2.4 p8:

The result of attempting to indirectly access an object with temporary lifetime from a thread other than the one with which the object is associated is implementation-defined.

Add to 7.26.1p3:

__STDC_THREAD_TEMPORARY_VISIBLE__
which expands to 1 if objects of temporary lifetime are visible to other threads and to 0 otherwise.

Oct 2012 meeting

Proposed Committee Response

Objects with temporary lifetime are defined in 6.2.4 paragraph 8 to be those with automatic storage duration, and so inter-thread access is implementation defined. No change needed.


Previous Defect Report < - > Next Defect Report