[sv-bc] tf_port_item footnote 33

From: Francoise Martinolle <fm_at_.....>
Date: Tue Jul 24 2007 - 10:21:42 PDT
Someone reported this inconsistency to me:

 

In the SV BNF, there is a note in the tf_port_item production as
follows:

"tf_port_item33 ::=

{ attribute_instance }

[ tf_port_direction ] [ var ] data_type_or_implicit [ port_identifier {
variable_dimension } [ = expression ] ]

33) In a tf_port_item, it shall be illegal to omit the explicit
port_identifier except within a function_prototype or task_prototype."

tf_port_item is used in tf_port_list which is used in task_prototype,
function_prototype and method prototype.

But this seems contradictory with the text for out of block declarations
in 8.22

"The out-of-block method declaration must match the prototype
declaration exactly; the only syntactical difference is that the method
name is preceded by the class name and the class scope resolution
operator ::"

So is the following code illegal?

class foo;

extern function bar ( int);   // prototype

endclass

function foo::bar ( int i ); ... endfunction  // function declaration

If the explicit port_identifier is ONLY optional in a prototype, how can
its implementation (task declaration or function declaration ) match
exactly?

If we believe the BNF and its note, the above extern'd prototype is
legal but its implementation is not.

 

Francoise

    


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jul 24 10:21:45 2007

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2007 - 10:22:17 PDT