Re: [sv-bc] macro_text length limit?

From: Coffin, Eric <eric_coffin_at_.....>
Date: Tue Jan 13 2009 - 09:44:06 PST
Geoffrey,

There is no defined upper or lower limit to the number of characters allowed in a macro definition. 

I do not think that placing an upper limit on the number of characters would be beneficial. 

The P1800-2009D8 only specifies that implementations support a minimal identifier length of 1024 characters.  The draft version does not specify an implementation's minimal supported length for string literals or numeric literals either.   A minimal length of 4096 for macro_text should not be a problem.

-Eric


Geoffrey.Coram wrote:
In 1364-2005.pdf and P1800-2009 draft 8, I don't see any
mention of a limit to the number of characters in the
macro_text.  Is there such a limit?  Should there be one,
or some requirement that an implementation allow at least
some number?

(I found a GNU CPP document that mentions that
"The C standard requires a minimum of 4096 [characters
on a logical source line] be permitted."  It also mentions
the number of significant initial characters, number of
simultaneous macros, and number of arguments.)

There are some Verilog-AMS models that make extensive use
of macros for compact device models -- eg, an entire diode
model (with leakage, breakdown, capacitance, etc.) defined
as a macro so that it can be instantiated once for drain-
body and once for source-body.

-Geoffrey


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Tue Jan 13 09:44:45 2009

This archive was generated by hypermail 2.1.8 : Tue Jan 13 2009 - 09:46:02 PST