[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ISO C99 mixed declaration and statements
From: |
Bruno Haible |
Subject: |
ISO C99 mixed declaration and statements |
Date: |
Fri, 18 Aug 2023 15:04:28 +0200 |
Hi Gavin,
I see this commit:
* install-info/install-info.c (output_dirfile): Avoid mixed
declaration and statements.
Is it possible nowadays to assume ISO C99 mixed declaration and statements
are supported by the C compiler? I don't know about the portability targets
of TeXinfo, but for those of Gnulib, documented in [1], we can now make
this assumption [2].
In Gnulib, for more than one year, we use Autoconf's AC_PROG_CC macro to ensure
an option to enable C99 mode (or newer) is used if available, and we use
declarations after statements more and more. This works just fine. The last
compiler that I had access to, that did not grok declarations after statements,
was 'cc' on IRIX 6.5. So I used gcc on that platform.
Bruno
[1] https://www.gnu.org/software/gnulib/manual/html_node/Target-Platforms.html
[2]
https://www.gnu.org/software/gnulib/manual/html_node/C99-features-assumed.html
- ISO C99 mixed declaration and statements,
Bruno Haible <=