[sv-ec] comment in compiler macros

From: Daniel Mlynek <daniel.mlynek_at_.....>
Date: Thu Jun 25 2009 - 01:55:33 PDT
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, and is
believed to be clean.
Received on Thu Jun 25 02:05:35 2009

This archive was generated by hypermail 2.1.8 : Thu Jun 25 2009 - 02:06:32 PDT