Re: B29 Line and File compiler Directives.

From: Eli Sternheim (eli@avanticorp.com)
Date: Mon Jan 04 1999 - 13:44:31 PST


Hi Adam (and the rest of btf).

I guess I was refering to the info page of cpp from GNU. Yes the extra
parameters are optional. Regarding the wording, I just wanted to avoid
duplication. No objection to any specific wording. Here is the GNU
info page, Eli.

C Preprocessor Output
=====================

   The output from the C preprocessor looks much like the input, except
that all preprocessing directive lines have been replaced with blank
lines and all comments with spaces. Whitespace within a line is not
altered; however, a space is inserted after the expansions of most
macro calls.

   Source file name and line number information is conveyed by lines of
the form

     # LINENUM FILENAME FLAGS

which are inserted as needed into the middle of the input (but never
within a string or character constant). Such a line means that the
following line originated in file FILENAME at line LINENUM.

   After the file name comes zero or more flags, which are `1', `2',
`3', or `4'. If there are multiple flags, spaces separate them. Here
is what the flags mean:

`1'
     This indicates the start of a new file.

`2'
     This indicates returning to a file (after having included another
     file).

`3'
     This indicates that the following text comes from a system header
     file, so certain warnings should be suppressed.

`4'
     This indicates that the following text should be treated as C.

<p><p> Date: Mon, 4 Jan 1999 13:22:42 -0600 (CST)
   From: Adam Krolnik <adamk@cyrix.com>
   Reply-To: Adam Krolnik <adamk@cyrix.com>
   Cc: btf@boyd.com
   MIME-Version: 1.0
   Content-MD5: leyo+IyU6bysnPQZizeJAQ==
   X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4m sparc
   Content-Type: TEXT/plain; charset=us-ascii
   Content-Length: 1531

<p><p> Good afternoon Eli:

   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).

<p> 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.

   If you prefer the Sun wording of the cpp to my writing (while reading
   this man page and the Verilog LRM) They please indicate.

<p> Adam Krolnik
       Verification Engineer
       Cyrix - NSC.
       Richardson TX. 75085



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:53:24 PDT and
sponsored by Boyd Technology, Inc.