I think that at the end of 8.6 talking only about constructor methods ( methods with name "new")
In LRM "8.9 Static methods" chapter wrote:
" Methods can be declared as static."
And also:
"A static method is different from a task with static lifetime. The former refers to the lifetime of the method
within the class, while the latter refers to the lifetime of the arguments and variables within the task."
class TwoTasks;
static task t1(); ... endtask // static class method with
// automatic variable lifetime
task static t2(); ... endtask // ILLEGAL: nonstatic class method with
// static variable lifetime
endclass
Irina Lavva
-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Bresticker, Shalom
Sent: Wednesday, February 17, 2010 10:23 AM
To: Daniel Mlynek; 'Surya Pratik Saha'; sv-bc@eda.org; sv-ec@eda.org
Subject: RE: [sv-ec] Extern static class method declaration
The LRM is explicit:
"It shall be illegal to declare a class method with a static lifetime." (end of 8.6)
You might argue that it should be legal to declare a static method with static lifetime, but today it is illegal.
Shalom
> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On
> Behalf Of Daniel Mlynek
> Sent: Wednesday, February 17, 2010 9:15 AM
> To: 'Surya Pratik Saha'; sv-bc@eda.org; sv-ec@eda.org
> Subject: RE: [sv-ec] Extern static class method declaration
>
> I think that static lifetime for class methods is illegal for
> both static
> and non-static methods.
>
> DANiel
>
> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On
> Behalf Of Surya
> Pratik Saha
> Sent: Wednesday, February 17, 2010 7:34 AM
> To: sv-bc@eda.org; sv-ec@eda.org
> Subject: [sv-ec] Extern static class method declaration
>
> Hi,
> As per SV 2009 LRM, the non-static method with static
> variable lifetime
> declaration is illegal. But I think following case is legal:
> class C;
> static task static t;
> endtask
> endclass
>
> But, I could not find anyway to declare it via external,
> because as per BNF,
> task_prototype rule does not permit to use 'static' after
> task keyword. So
> following case is illegal:
>
> class C;
> extern static task static t(); // BNF does not permit the
> 2nd 'static'
> endclass
> task static C::t;
> endtask
>
> I think LRM should have a provision for that. Different tools behave
> differently here though. Is there any mantis already for that?
>
> --
> Regards
> Surya
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Feb 17 00:53:37 2010
This archive was generated by hypermail 2.1.8 : Wed Feb 17 2010 - 00:53:53 PST