This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] Expand empty parallel directives into empty statements


On Tuesday 01 November 2005 13:54, Jakub Jelinek wrote:

> Is that a safe thing to do in presence of constructors and/or
> destructors in vars mentioned explicitly in the clauses?
>
Since we are not going to do anything with them, they are not even going to 
be dereferenced, they will just get tossed out.  What scenario do you have 
in mind?

class A
{
  int x, y;

public:
  A() { x = 0; y = 0; }
  ~A() { }
};

main()
{
  class A x;
#pragma omp parallel private (x)
    {
    }
}

Why would it be unsafe to replace that empty directive with (void)0?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]