Closed jddurand closed 6 years ago
Merging #61 into master will decrease coverage by
<1%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #61 +/- ##
======================================
- Coverage 88% 88% -1%
======================================
Files 41 41
Lines 3848 3848
Branches 781 0 -781
======================================
- Hits 3421 3417 -4
- Misses 427 431 +4
Good point with varargs.h. Am I right that stdarg.h is a newer implementation and is recommended for usage? We can actually detect the presence of these headers and chose stdarg.h if available, if not - try to use varargs.h. Similar situation with values.h and limits.h. Exactly the same solution was used: use limits.h first (if available), or values.h as plan B. Can we implement the same approach in our case?
Nope, the semantic is not the same. IMHO this is asking for trouble. varargs still exist only to not break dinosaur-aged programs, and is officially discouraged since decennies -; But it is still here unfortunately.
Started to check on various operating systems. Some results:
Unfortunately, I do not have access to the rest of VMs right now, thus I will continue testing after January 9.
I decided to stick with stdarg.h, which is a part of C89. I think it is old enough to demand it for any target platform. I also added a note about compatibility with varargs.h to make it clear.
I do not really know how to fulfill your coding style, nevertheless you'll get the idea: have a p_va_copy available everywhere.