|
|
Log in / Subscribe / Register

Improved error reporting for CPython 3.10—and beyond

Improved error reporting for CPython 3.10—and beyond

Posted May 24, 2022 22:06 UTC (Tue) by ballombe (subscriber, #9523)
In reply to: Improved error reporting for CPython 3.10—and beyond by abatters
Parent article: Improved error reporting for CPython 3.10—and beyond

This is a gcc limitation. The compiler I used before gcc (so before 1994) did not do that, it would say "semicolon expected". I remember because I was a C beginner then and made tons of syntax errors.


to post comments

Improved error reporting for CPython 3.10—and beyond

Posted May 26, 2022 11:53 UTC (Thu) by bluss (guest, #47454) [Link] (1 responses)

You could call it a "feature". It's a feature to be able to continue past an error and still do an effort to report further errors in the compilation. Sometimes this is even useful - if the errors are independent, you can read them and fix all in one turn of the edit-compile cycle. Unfortunately, if nonsensical knock-on errors are reported, then the end result is less useful.

Rustc early in it development used to be really nice. It's always been good at reporting clear error messages, and it's still doing that well. Unfortunately during its development it's also become a more advanced compiler, and is now very "good" at continuing to compile and report more errors. Again, this sometimes creates lots of nonsensical knock-on errors that are useless to the user. So Rustc grew up and joined GCC in this problem area.

Of course we need to nudge beginners to learn to always look at the first error from the compiler, not the last one (the last one is usually the one remaining in view, unfortunately.)

Improved error reporting for CPython 3.10—and beyond

Posted May 27, 2022 2:26 UTC (Fri) by cozzyd (guest, #110972) [Link]

It's also easy to limit the number of errors printed in gcc.


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