|
|
Subscribe / Log in / New account

Nftables reaches 1.0

Nftables reaches 1.0

Posted Aug 28, 2021 21:24 UTC (Sat) by Paf (guest, #91811)
In reply to: Nftables reaches 1.0 by pbonzini
Parent article: Nftables reaches 1.0

My experience with C++ errors around 2010-2011 (with whatever was in Ubuntu at the time) was there was a lot of multi-page spew when using even fairly simple templates?


to post comments

Nftables reaches 1.0

Posted Aug 30, 2021 13:22 UTC (Mon) by pbonzini (subscriber, #60935) [Link]

I have never done serious C++, but I think the issue there was that the error messages were overly precise and expanded the same template typenames over and over. At some point a couple tweaks were made, teaching the compiler about default template arguments and typedefs.

In C, the problem was abysmal error recovery, causing dozens of cascaded errors for a single missing semicolon or fat-fingered type name (such as "intt" or "unsgined char"). With a recursive descent parser it's relatively easy and maintainable to add heuristics that look ahead and insert missing tokens or fix things up as necessary. For example if you see two consecutive unknown identifiers, it's likely that the first is a misspelled type and the second is a variable name. With some luck, that will remove a lot of errors involving that variable, because the compiler now knows about it and treats it as declared.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds