https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117308
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #2) > (In reply to Thomas Kieß from comment #0) > > the current implementation limits overview > > (https://gcc.gnu.org/onlinedocs/gcc-14.2.0/cpp/Implementation-limits.html) > > N.B. this page is for cpp the C preprocessor, not for C++. That's why it only lists things like the number of nested includes and other limits relevant to preprocessing. I don't think there's an equivalent page for the C++ compiler, but I don't think there are any set limits for any of the other quantities. They are limited only by available memory, but as I said, in practice you'll probably encounter unacceptably slow compile times on modern machines with multiple gigabytes of memory available. Some algorithms within the compiler are quadratic or worse, so when dealing with ridiculously complicated expressions, source files, or numbers of data members in a struct, performance may slow to a crawl even before memory is exhausted. If you encounter practical limits, please report them as bugs with one of the keywords "compile-time-hog" or "memory-hog".