> On Mar 15, 2023, at 4:23 AM, Taylor R Campbell > <campbell+netbsd-tech-userle...@mumble.net> wrote: > > Proposal: Forbid extern declarations in .c files. > > extern declarations in .c files invite easily avoided bugs where the > definition and use have mismatched types, because the compiler doesn't > have an opportunity to check them. Fix: Always put the extern > declaration in a .h file shared by the .c file defining it and the .c > files using it. > > Pretty simple. Any objections?
LGTM. Would be nice if there was a way to get the compiler to enforce this. -- thorpej