[PATCH v4 11/14] log: add a per line log helper
    Stephen Hemminger 
    stephen at networkplumber.org
       
    Tue Dec 19 18:16:52 CET 2023
    
    
  
On Tue, 19 Dec 2023 16:45:19 +0100
Thomas Monjalon <thomas at monjalon.net> wrote:
> 18/12/2023 15:38, David Marchand:
> > +#ifdef RTE_TOOLCHAIN_GCC
> > +#define RTE_LOG_CHECK_NO_NEWLINE(fmt) \
> > +	static_assert(!__builtin_strchr(fmt, '\n'), \
> > +		"This log format string contains a \\n")
> > +#else
> > +#define RTE_LOG_CHECK_NO_NEWLINE(...)
> > +#endif  
> 
> No support in clang?
clang has static assert, but probably not builtin_strchr
    
    
More information about the dev
mailing list