|
From: | Paul Eggert |
Subject: | Re: Making MSVC/clang-cl succeed AC_PROG_CC C11 discovery |
Date: | Tue, 30 Apr 2024 10:43:54 -0700 |
User-agent: | Mozilla Thunderbird |
On 2024-04-26 08:10, Zack Weinberg wrote:
I think what we should do here is fold AC_C_VARARRAYS into AC_PROG_CC. Take the test for VLAs completely out of _AC_C_C99_TEST_MAIN, but unconditionally *run* a test for VLAs as part of AC_PROG_CC. If that test fails, and __STDC_NO_VLA__ was not defined by the compiler, then AC_DEFINE([__STDC_NO_VLA__], 1)
Although the basic strategy sounds reasonable, AC_PROG_CC is documented to operate by setting compiler options not via AC_DEFINE, so presumably this should put -D__STDC_NO_VLA__ into $CC rather than use AC_DEFINE.
I installed the attached patch, which is less ambitious but should address the original problem report. The attached patch doesn't preclude your suggestion, which can be done later as needed.
0001-Port-better-to-MSVC.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |