From 110bb12121aa4704ab1cb9b424bc513018f53544 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 3 Apr 2018 14:04:31 -0400 Subject: [PATCH] doc: add note and example on use of VERSION_TYPE_DEV and CONFDATE Signed-off-by: Lou Berger --- doc/developer/workflow.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst index a6a950f685..291a277c6b 100644 --- a/doc/developer/workflow.rst +++ b/doc/developer/workflow.rst @@ -708,7 +708,14 @@ either: In all cases, compatibility pieces should be marked with compiler/preprocessor annotations to print warnings at compile time, pointing to the appropriate update path. A ``-Werror`` build should fail -if compatibility bits are used. +if compatibility bits are used. To avoid compilation issues in released +code, such compiler/preprocessor annotations must be ignored +non-development branches. For example: + + #if defined(VERSION_TYPE_DEV) && CONFDATE > 20180403 + CPP_NOTICE("Use of is deprecated, please use ") + #endif + Preferably, the shell script :file:`tools/fixup-deprecated.py` will be updated along with making non-backwards compatible code changes, or an -- 2.39.5