This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] Expand empty parallel directives into empty statements
On Tuesday 01 November 2005 14:16, Jakub Jelinek wrote:
> The standard talks about the order of invoking constructors, but I don't
> see a wording where it would say if the constructors/destructors must
> or don't have to be run even for variables never explicitly referenced
> in the construct except for the clauses.
>
Actually, it does say (2.8.3.3, p74, l8) "... This allocation occurs once
for each thread in the team that references the list item in any statement
in the the construct.".
Since the variable is not referenced, we are not obligated to invoke its
ctor/dtor. I would also be willing to hunt down and slap around anyone
who depended on such abominable behaviour. But then, I'm not a language
lawyer.