On Monday, 17 July 2017 10:58:21 Bastian Märkisch wrote:
> It seems that a C99 compiler is a prerequisite for gnuplot. It (now)
> e.g. snprintf and union initializers. Single-line-comments were introduced
> in C99, too. So why dont we allow them? Which platform / compiler still does
> not allow them?
builds and runs with no complaint once the C++ style comments are removed.
I do not know how many platforms support c89 but not c99.
snprintf() has been used in terminal code at least back to version 4.4.
By version 4.6.2 it was in the core code also. The few explicit checks for
HAVE_SNPRINTF were vestigial protections from longer ago than that.
I don't have any particular preference for continuing to claim c89 compatibility.
I only checked because the INSTALL file for 5.2 still showed CC=c89
in the example configuration and I wondered if that really worked.
It didn't, because of the // comments.
I agree that if we bump the requirement to c99 then the single-line
comments do not cause a problem.