RE: [sv-bc] Query related with the visibility of enum member.

From: Rich, Dave <Dave_Rich@mentor.com>
Date: Fri May 14 2010 - 07:23:19 PDT

dhiRAj,

 

A enumerated type declares set of integral named constant members in the
same scope that the enumerated type name exists. That is why you are not
allowed to repeat the names in more than one enumerated type in the same
scope, or re-use the name for any other identifier in the same scope.
The identifiers (names) of an enumerated type have the same visibility
rules of any other identifier.

 

Dave

 

 

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Dhiraj Kumar Prasad
Sent: Friday, May 14, 2010 12:44 AM
To: sv-bc@server.eda.org
Cc: Surya Pratik Saha; Dhiraj Kumar Prasad
Subject: [sv-bc] Query related with the visibility of enum member.

 

Hello,

I have a query related with visibility of enum member.

For the following testcase

typedef struct {
            enum {NO,YES} boolean;
            }mystruct;

module mod1();

int a = NO;
endmodule

"NO" will be visible inside module ?? As some of the standard tools are
passing while others
are showing error.

Regards,
dhiRAj

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is
believed to be clean. 
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri May 14 07:23:38 2010

This archive was generated by hypermail 2.1.8 : Fri May 14 2010 - 07:26:31 PDT