On 9/15/2020 7:13 AM, Peter Dimov via Boost wrote:
Edward Diener wrote:
Which compilers will be affected?
Right now these compilers are considered by PP to not support variadic macros:
gccxml nvcc when cuda is being used PathScale Digital Mars and Symantec C++ bcc32 metrowerks sun/oracle C++ < version 5.12 ( current oracle C++ version is 12.6 ) HP aC++ when not using EDG MPW C++ PGI when not using EDG
This doesn't sound that bad, as most of these compilers are dead, although I hope nvcc does support variadic macros nowadays.
I did discover that if gcc or clang is compiled at the C++03 level with -pedantic there will be a ton of warnings, and if with -pedantic-errros there will be a ton of errors for those warnings. The main culprits, for C++03 at the pedantic level, are that variadic macros are not supported and that empty macro arguments are undefined. The warnings do not impact the code from working properly, but of course the errors stop the code from working. So the gist is that if I change Boost PP to only support variadic macros an end-user compiling the preprocessor library headers at the gcc/clang C++03 level, whether directly or through many other Boost C++03 libraries which use Boost PP, and specifying either -pedantic or -pedantic-errros, will run into a bunch of warnings or a bunch of errors accordingly. Of course this will also depend on the Boost PP macros being used, since only a subset of macros when invoked uses variadic macros in their implementation. I still think that in line with Boost officially deprecating the C++03 level of compilation it will be advantageous to have Boost PP be a library which assumes variadic macro support and does not work properly in many instances without variadic macro support. My local branch for this shows much simplification of code and a much clearer use of macros in the library so unless there is a general outcry I am still determined to go ahead with this. I think the few people who may still be trying to use Boost libraries with gcc or clang at the C++03 level can be told to turn off -pedantic-errors if necessary. I will add a note to the documentation for Boost PP about this.