tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: heads up RE autoconf C23 vs legacy code
Tobias Nygren <tnn%NetBSD.org@localhost> writes:
> Hi,
>
> The recent autoconf upgrade broke devel/scmcvs. It is now injecting
> -std=gnu23 on the command line after having regenerated the configure
> script. Apparently this is by design since autoconf 2.73 but it's not
> mentioned anywhere in the commit message.
>
> There are legacy prototypes in scmcvs that don't compile with C23.
> FORCE_C_STD=gnu99 seems to undo autoconf's assumptions so I guess
> that's the fix we should use? Probably there are other packages that
> are broken. I found macports PRs related to PHP 8.2, 8.3, 8.4 ...
Lots of things break with C23. Yes we can hack around that with
FORCE_C_STD, but a program should document what dialect it is written
in, and probe for at set --std for it.
autoconf adding --std=c23, when configure.ac does not request it, is an
obvious and serious bug. But I see in the autoconf manual that
AC_PROG_CC is documented to find and ask for the highest standard that
the compiler supports.
I am concerned that we are rapidly going off the rails of sanity,
although that appears to be mostly upstream bugs. I would like us to
step back and try to fix the bugs where are they are.
I think that's figuring out how to patch scmcvs's configure.in to ask
for C99. Or maybe it's in c89.
Another option would be to have the wrappers error out on --std=c23, if
c23 is not in USE_CC_FEATURES. That should fix all of those
look-for-c23 enable it bugs in autoconf, in programs that are written in
some earlier dialect. That actually could be a good fix.
Home |
Main Index |
Thread Index |
Old Index