[sv-bc] FW: [sv-ec] comment in compiler macros

From: Arturo Salz <Arturo.Salz_at_.....>
Date: Thu Jun 25 2009 - 02:32:18 PDT
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Daniel Mlynek
Sent: Thursday, June 25, 2009 1:56 AM
To: sv-ec@eda.org
Subject: [sv-ec] comment in compiler macros

Question is how should compiler treat comments  in precompiler macros - i've browse LRM and I haven't found any answer. LRM states only :

If a one-line comment (that is, a comment specified with the characters //) is included in the text, then the comment shall not become part of the substituted text. The macro text can be blank, in which case the text macro is defined to be empty and no text is substituted when the macro is used.

But what for below case -  "//" comment out the end of line '\" needed to split lines of define - so imho comments finishes the macros and below code should fail

CODE:

`define DAN \
// test \
// test \
 $display("ok");
`define DAN1 //ref \
\
 $display("ok1");

module top;
 initial begin
  `DAN
  `DAN1
 end

endmodule



DANiel

--
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 Thu Jun 25 02:33:19 2009

This archive was generated by hypermail 2.1.8 : Thu Jun 25 2009 - 02:34:13 PDT