[sv-bc] Amendment to the compilation unit definition


Subject: [sv-bc] Amendment to the compilation unit definition
From: David W. Smith (David.Smith@synopsys.com)
Date: Thu Dec 04 2003 - 20:44:08 PST


Greetings,

There has been some discussion going on about a refinement to the definition
of a compilation unit. The attached file contains my current understanding
of this discussion. Doug Warmke has been leading this discussion and asked
me to write up something that the committee could consider. There were some
items under discussion:

 

1. The behavior of include files was not explicitly stated. Since
'include is a directive it is reasonable to assume that the contents of each
include file are inlined and become part of the compilation unit of the file
where the 'includes occur. This clearly holds through multiple levels of
includes. The proposal adds an explicit statement for this.
2. The handling of incomplete declarations at the end of a file was not
specified. The proposal specifies that incomplete declarations at the end of
a file cause the next file to be included in the compilation unit. This
continues until a file is reached that ends in a complete declaration.
3. The default definition of a compilation unit was not specified.
There was an implicit definition that it would be all of the files specified
when compilation occurs. This is neither explicit nor the safest default.
The proposal changes the default to be that a compilation unit is a single
file.
4. Another change is to make a requirement that every tool shall
provide a tool specific mechanism (command line option?) that specifies that
all of the files compiled together are a single compilation unit. This
provides a backward compatible mechanism for 3.0 (and was in the original
proposal that was approved).
5. The final change is to indicate that, while other mappings of files
to compilation units are possible, they are neither required nor portable.

 

While these issues have been discussed and agreed upon by a number of
individuals there has been no review of the attached proposal.

 

I will not be available to join the phone call. Please enjoy and feel free
to word smith to get the agreed upon semantics clearly defined.

 

Regards

David

 




This archive was generated by hypermail 2b28 : Thu Dec 04 2003 - 20:46:52 PST