Created
July 9, 2021 02:16
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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