tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dealing with inevitable warnings from new compilers on old code



On Fri, Jun 14, 2024 at 05:28:58AM -0700, Greg A. Woods wrote:
 > I think you may not be understanding the problem fully.
 > 
 > Please have a review of the thread with the subject "next steps from
 > recent macOS fallout" started back on 2024/04/04.

I gather the problem is that clang and/or gcc are now rejecting code
that was marked deprecated in 1989?

clang has done this before (there are a lot of patches for implicit
int in the tree) so it may not be as big a problem as you're
expecting, and the solutions are well known and straightforward, so
I'm not sure what you're arguing about.

If the problem is that either or both compilers are adopting some of
the foolishness from C23 in ways that break existing code, that's a
different matter...

 > We can be confident that most C packages in pkgsrc, and specifically
 > those that don't supply "-std=" themselves, are able to be built and
 > work with a GNU99 compiler, and for the moment we know that the newer
 > compilers pkgsrc is likely to encounter will not force -Werror for new
 > warnings if they're told to downgrade the language level with
 > "-std=gnu99", so if pkgsrc is used on a platform with one of these newer
 > compilers then ideally pkgsrc should provide a _default_ "-std=gnu99"
 > setting (but not override those packages the provide their own "-std=").

That is completely an overreaction.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index