diff options
author | Detlef Riekenberg <wine.dev@web.de> | 2022-09-04 01:57:25 +0200 |
---|---|---|
committer | Zack Weinberg <zack@owlfolio.org> | 2023-12-12 15:23:16 -0500 |
commit | ba719bedba517b501473b3d86af5202f379fced8 (patch) | |
tree | fec0be6dceaaf7ed0ff75d9b31197ab5c28d8950 | |
parent | 185d1db28b48f78eb480a8d19db100ecda7a4fc1 (diff) | |
download | autoconf-ba719bedba517b501473b3d86af5202f379fced8.tar.gz |
Consistently use block comments at beginning of C99 and C11 tests
Purely cosmetic improvement to the C standard version tests: Use /* */
comments above all three checks of __STDC__ and/or __STDC_VERSION__,
and make “// See if C++-style comments work” the very first // comment.
Resolves issue #110713.
* c.m4 (_AC_C_C99_TEST_GLOBALS, _AC_C_C11_TEST_GLOBALS):
Improve stylistic consistency with _AC_C_C89_TEST_GLOBALS.
Move explicit test of C++-style comments earlier.
-rw-r--r-- | lib/autoconf/c.m4 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 77ff1af8..6cdef6fa 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -1193,11 +1193,13 @@ AC_DEFUN([_AC_C_C99_TEST_GLOBALS], [m4_divert_text([INIT_PREPARE], [[# Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? +/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work. + #include <stdbool.h> extern int puts (const char *); extern int printf (const char *, ...); @@ -1253,7 +1255,6 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { - // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -1348,7 +1349,7 @@ AC_DEFUN([_AC_C_C11_TEST_GLOBALS], [m4_divert_text([INIT_PREPARE], [[# Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? +/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif |