> On Aug 24, 2019, at 7:57 PM, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote: > >> On Sat, Aug 24, 2019 at 08:50:59AM -0500, Kumar Gala wrote: >> >> >>>> On Aug 23, 2019, at 2:15 AM, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote: >>>> >>>> On Tue, Aug 20, 2019 at 01:19:42PM -0500, Kumar Gala wrote: >>>> Is there some operator/function we could define to be able to flag deprecated defines. >>>> >>>> For example with gcc we can do: >>>> >>>> #define __DEPRECATED_MACRO _Pragma("GCC warning \"Macro is deprecated\”") >>>> >>>> So something like: >>>> >>>> clock-frequency = < /deprecate/ I2C_BITRATE_STANDARD 100000 >; >>> >>> I don't quite understand your example. I assume the idea of the >>> __DEPRECATED_MACRO thing is that you put that in the macro definition, >>> so that it will warn you any time you use it. >>> >>> But then your dts example has the /deprecate/ tag at the _invocation_ >>> of the macro so I don't really see how that's useful. >>> >> >> The idea is there’s some ‘operator’ that dtc can parse that would >> report a deprecation warning. So I was suggesting /deprecate/ as >> the operator. > > Ah! I see now. > > So, I think we could handle this pretty straightforwardly with a > /error/ and/or /warning/ tag. Those would operate similarly to #error > and #warning in C, but unlike those not be preprocessor macros, > meaning we can generate them from macros. > > -- > David Gibson | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ > | _way_ _around_! > http://www.ozlabs.org/~dgibson Sounds perfect, is this something you could code up? Thanks - k