nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] patacongo commented on issue #956: Is z80 compiler still not support CONFIG_CPP_HAVE_VARARGS?
Date Sun, 03 May 2020 15:53:11 GMT

patacongo commented on issue #956:
URL: https://github.com/apache/incubator-nuttx/issues/956#issuecomment-623130664


   The refers only VARARGS are used in preprocessor macros.  Like in debug.h:
   
        104 #ifdef CONFIG_CPP_HAVE_VARARGS
        138 #  define _info(format, ...) \
        139    __arch_syslog(LOG_INFO, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
        722 #else /* CONFIG_CPP_HAVE_VARARGS */
        739 #  define _info       (void)
       1320 #endif /* CONFIG_CPP_HAVE_VARARGS */
   
   This has nothing to do with the compiler.  It is a feature of the C preprocessor.  This
is not a problem for the SDCC toolchain used with z80 and z180 because they use the same GNU
pre-processor as does GCC.  However, it is a problem for the ZDS-II toolchain which use a
different pre-processor and cannot handled pre-processor macros with a variable number of
arguments.
   
   The setting CONFIG_CPP_HAVE_VARARGS only applies to the pre-processor and has nothing to
do with variadic C functions with is part of the C standard and is handled by all C compiler.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message