[PATCH v2] dtc: Add support for named integer constants

Jon Loeliger jdl at jdl.com
Tue Sep 20 23:48:02 EST 2011


> 
> Things get trickier when we want to extend this to macros or
> functions.  The only problem I have with your patch at present is that
> I'd prefer not to implement a constant defining syntax, only to have
> it obsoleted by whatever we do for macros or functions.

Exactly.

> So, there are basically two approaches to macro or function support.
> 
> A) Functions
> B) Macros
>   B1) Use cpp itself
>   B2) Make our own preprocessor, isomorphic to cpp

To be thorough, there has been one other macro proposal: Use m4.
Suggesting that, however, has had the entertaining side effect
of causing internet-wide vomiting.


> Our current impasse is roughly that Jon prefers approach (A), whereas
> I prefer (B1) on balance.  (B1) would obsolete your suggested define
> syntax.  (A) and (B2) could both potentially subsume it, instead.

Right.

jdl


More information about the devicetree-discuss mailing list