From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Tue Aug 14 2001 - 05:10: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: Tue, 14 Aug 2001 15:06:10 +0300
--------------DA2FA00D11C738E468F57DA0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Please see the following, and then my comments:
Subject: Re: B29 Line and File compiler Directives.
From: Adam Krolnik <adamk@cyrix.com>
To: eli@avanticorp.com
> You mention that the `line directive having 2 additional optional parameters.
> I only have access to a sun/solaris CPP man page. These are the relevant
> sections:
>
> #line integer-constant "filename"
> Generate line control information for the next pass of
> the C compiler. integer-constant is interpreted as the
> line number of the next line and filename is inter-
> preted as the file from where it comes. If "filename"
> is not given, the current filename is unchanged. No
> additional tokens are permitted on the directive line
> after the optional filename.
>
> Output
> Output consists of a copy of the input file, with modifica-
> tions, plus lines of the form:
>
> #lineno " filename" "level"
>
> indicating the original source line number and filename of
> the following output line and whether this is the first such
> line after an include file has been entered (level=1), the
> first such line after an include file has been exited
> (level=2), or any other such line (level is empty).
>
> Are you asking for allowing the 'level' field from non specifyable
> directive? It would have to be optional since we are effectively
> merging two directives into one for Verilog.
It looks to me as though there was some confusion about the `line directive.
I looked at both CPP and Gnu CPP.
- 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.
- 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 ?
- By the way, the Gnu CPP man page specifies that the number parameter "is a non-negative decimal integer constant". (Interesting.
"Non-negative" means that 0 is permitted.)
- Also by the way, the CPP man page description of "level" is much clearer than what entered 1364.
In my opinion, "level" is a mistake and should be eliminated, and "filename" should be "optional".
Comments ?
Shalom
Shalom.Bresticker@motorola.com wrote:
> In 19.7 (`line): "The level parameter indicates whether an
> include file has been entered (value is 1), an include file
> is existed (value is), or neither has been done(value is 0)."
>
> This sentence is incomprehensible to me.
>
> At the very least, an example or examples must be added.
--
**************************************************************************
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
**************************************************************************
--------------DA2FA00D11C738E468F57DA0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Please see the following, and then my comments:
<blockquote>Subject: Re: B29
Line and File compiler Directives.
<br> From: Adam Krolnik
<adamk@cyrix.com>
<br> To:
eli@avanticorp.com
<blockquote TYPE=CITE>You mention that the `line directive having 2 additional
optional parameters.
<br>I only have access to a sun/solaris CPP man page. These are the relevant
<br>sections:
<p> #line integer-constant "filename"
<br> Generate line
control information for the next pass of
<br> the C compiler.
integer-constant is interpreted as the
<br> line number
of the next line and filename is inter-
<br> preted
as the file from where it comes. If "filename"
<br> is not given,
the current filename is unchanged. No
<br> additional
tokens are permitted on the directive line
<br> after the optional
filename.
<p> Output
<br> Output consists of a copy of the input file,
with modifica-
<br> tions, plus lines of the form:
<p> #lineno " filename"
"level"
<p> indicating the original source line number
and filename of
<br> the following output line and whether this
is the first such
<br> line after an include file has been entered
(level=1), the
<br> first such line after
an include file has been exited
<br> (level=2), or any other such line (level is
empty).
<p>Are you asking for allowing the 'level' field from non specifyable
<br>directive? It would have to be optional since we are effectively
<br>merging two directives into one for Verilog.</blockquote>
</blockquote>
<p><br>It looks to me as though there was some confusion about the `line
directive.
<br>I looked at both CPP and Gnu CPP.
<p>- The worst is the "level" parameter, which is a CPP <b>output</b>
! It is not a 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 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>- 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"
<br>is something like ".." ? Is the Verilog compiler/interpreter supposed
to relate to this as just a filename or is it
<br>supposed to interpret file location as well ?
<p>- By the way, the Gnu CPP man page specifies that the number parameter
"is a non-negative decimal integer constant". (Interesting. "Non-negative"
means that 0 is permitted.)
<p>- Also by the way, the CPP man page description of "level" is
much clearer than what entered 1364.
<p>In my opinion, "level" is a mistake and should be eliminated, and
"filename" should be "optional".
<p>Comments ?
<p>Shalom
<br>
<p>Shalom.Bresticker@motorola.com wrote:
<blockquote TYPE=CITE>In 19.7 (`line): "The level parameter indicates whether
an
<br>include file has been entered (value is 1), an include file
<br>is existed (value is), or neither has been done(value is 0)."
<p>This sentence is incomprehensible to me.
<p>At the very least, an example or examples must be added.</blockquote>
<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>
--------------DA2FA00D11C738E468F57DA0--
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:54:44 PDT
and
sponsored by Boyd Technology, Inc.