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
> a program should document what dialect it is written in
I think you can't blame people having written a C program close to half
a century ago for not having forseen that people would be changing the
language in incompatible ways.
> and probe for a[nd] set --std for it.
Unfortunately, there's no #pragma language-level. In Perl, I simply write
use 5.42;
(and use feature 'foobar';)
in the source to document which Perl exactly I write in.
> autoconf adding --std=c23, when configure.ac does not request it, is an
> obvious and serious bug.
Looks like it.
> 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.
That sounds like an *excellent* idea to me. Generally error out on --std=cnn
if pkgsrc's logic chose a different language level, at least for
PKG_DEVELOPER=YES? This may create an enormous amount of fall-out initially,
but then all these hard-to-find build failures would be gone.
Home |
Main Index |
Thread Index |
Old Index