Skip to content

Instantly share code, notes, and snippets.

@jeremy-rifkin
Created July 9, 2021 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremy-rifkin/8f8f947b23ed9244d9d4459038ac037d to your computer and use it in GitHub Desktop.
Save jeremy-rifkin/8f8f947b23ed9244d9d4459038ac037d to your computer and use it in GitHub Desktop.
Shortest known program to cause over 1,000 lines of error messages in gcc.
// C++ error messages are notorious.
// Some folks and I worked on a golf challenge: Shortest program to produce more
// than a thousand lines of error messages in gcc.
// Constraints: gcc >= 8, no -fmessage-length
// Fueled by the decltype(decltype) bug discovered by Jonathan Wakely (detailed
// at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92105), this is the current record
// 32 characters:
#define d decltype
d(d(d(d(d))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment