From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Thu Aug 16 2001 - 06:30:00 PDT
The following reply was made to PR errata/16; it has been noted by GNATS.
From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: <btf-bugs@boyd.com>
Cc:
Subject: Re: errata/16: 19.7 `line - meaning of level parameter is unclear
Date: Thu, 16 Aug 2001 16:20:52 +0300
--------------475A0F87A8A42B1DEE7B3138
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Adam Krolnik wrote:
> >- The worst is the "level" parameter, which is a CPP output ! It is not a
> >user directive at all ! It is INFORMATION
> > for the compiler which DESCRIBES the file hierarchy, not CONTROLLING it. >Even worse, it became a REQUIRED parameter in 1364-2001. No
> > wonder I did not understand its meaning and use in 1364!
>
> > - Why is "filename" required ? Neither CPP nor Gnu CPP require it ! I >might want to use the same file
> > in different places under different names. I should not have to play with >this directive each time.
>
> This came up in the discussions. To simplify parsing, all parameters
> became required.
I don't understand the parsing problem.
It seems to have easy solutions.
The 'linenum' parameter is required.
"filename" is always surrounded by parentheses.
'level' is not surrounded by parentheses.
Further, you could make "filename" required if you want to give 'level'.
So parsing should be easy.
> Since this directive was envisioned to be used by a
> source code generator (preprocessor, source to source translator, etc.)
> the requirement of the parameters was not considered a hardcase. You are
> correct, it is not controlling anything; nor would you want it to.
Again, it looks to me to be a confusion between a compiler DIRECTIVE,
which TELLS the compiler to DO something, on the one hand,
and an informative preprocessor output on the other.
If, for CPP, 'linenum' and "filename" were enough, why does Verilog need 'level' as well ?
What does it add ? Why can't it just be a comment ?
And a preprocessor may not know, for example, whether a file is included or not.
> > - The Gnu CPP man page says that "filename" is a string constant. >Neither CPP nor Gnu CPP say that "filename" can be a full or
> > relative path name. Why here ? (I'm devil's advocate here.) What happens
> > if "filename"
> > is something like ".." ? Is the Verilog compiler/interpreter supposed to
> >relate to this as just a filename or is it supposed to interpret file
> >location as well ?
>
> The filename is a string - whatever you want to put there. The
> compiler's
> only use for this data is to inform the user of something pertaining
> to it. So your filename could be any of your examples. What the user
> puts in is what he will get out.
But if the LRM says it can be a full or relative path name, that seems to imply that it has real meaning.
--
**************************************************************************
Shalom Bresticker Shalom.Bresticker@motorola.com
Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268
P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890
**************************************************************************
--------------475A0F87A8A42B1DEE7B3138
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Adam Krolnik wrote:
<blockquote TYPE=CITE>>- The worst is the "level" parameter, which is a
CPP output ! It is not a
<br>>user directive at all ! It is INFORMATION
<br>> for the compiler which DESCRIBES the file hierarchy, not CONTROLLING
it. >Even worse, it became a REQUIRED parameter in 1364-2001. No
<br>> wonder I did not understand its meaning and use in 1364!
<p>> - Why is "filename" required ? Neither CPP nor Gnu CPP require it
! I >might want to use the same file
<br>> in different places under different names. I should not have to play
with >this directive each time.
<p>This came up in the discussions. To simplify parsing, all parameters
<br>became required.</blockquote>
I don't understand the parsing problem.
<br>It seems to have easy solutions.
<br>The 'linenum' parameter is required.
<br>"filename" is always surrounded by parentheses.
<br>'level' is not surrounded by parentheses.
<br>Further, you could make "filename" required if you want to give
'level'.
<br>So parsing should be easy.
<br>
<blockquote TYPE=CITE>Since this directive was envisioned to be used by
a
<br>source code generator (preprocessor, source to source translator, etc.)
<br>the requirement of the parameters was not considered a hardcase. You
are
<br>correct, it is not controlling anything; nor would you want it to.</blockquote>
Again, it looks to me to be a confusion between a compiler DIRECTIVE,
<br>which TELLS the compiler to DO something, on the one hand,
<br>and an informative preprocessor output on the other.
<p>If, for CPP, 'linenum' and "filename" were enough, why does Verilog
need 'level' as well ?
<br>What does it add ? Why can't it just be a comment ?
<p>And a preprocessor may not know, for example, whether a file is included
or not.
<br>
<blockquote TYPE=CITE>> - The Gnu CPP man page says that "filename"
is a string constant. >Neither CPP nor Gnu CPP say that "filename" can
be a full or
<br>> relative path name. Why here ? (I'm devil's advocate here.) What
happens
<br>> if "filename"
<br>> is something like ".." ? Is the Verilog compiler/interpreter supposed
to
<br>>relate to this as just a filename or is it supposed to interpret file
<br>>location as well ?
<p>The filename is a string - whatever you want to put there. The
<br>compiler's
<br>only use for this data is to inform the user of something pertaining
<br>to it. So your filename could be any of your examples. What the user
<br>puts in is what he will get out.</blockquote>
But if the LRM says it can be a full or relative path name, that seems
to imply that it has real meaning.
<br>
<pre>--
**************************************************************************
Shalom Bresticker Shalom.Bresticker@motorola.com
Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268
P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890
**************************************************************************</pre>
</html>
--------------475A0F87A8A42B1DEE7B3138--
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:54:44 PDT
and
sponsored by Boyd Technology, Inc.