Large single compilation-unit C programs (2006)
people.csail.mit.edu
Large single compilation-unit C programs (2006)
1–10 of 23 posts
Re: Large single compilation-unit C programs (2006)
#2So for every loop continue statement there is a GPL license text :D
Re: Large single compilation-unit C programs (2006)
#3Re: Large single compilation-unit C programs (2006)
#41283 = continue 1432 = license 1766 = gnu So for every loop continue statement there is a GPL license text :D
In practice, it doesn't matter at all as the preprocessor replaces all license headers with a single space even before the compiler has the chance to look at it.
Re: Large single compilation-unit C programs (2006)
#5May be relevant to the discussion: SQLite is also compiled from a single, 220k LOC C file called "the amalgamation". https://www.sqlite.org/amalgamation.html
https://github.com/rindeal/Amalgamate
Which seems interesting, however when I tried the FreeType example, there seemed to be some preprocessing issue, such that some function definitions are conditionally excluded even though they are called later. I didn't have the time to find out if this was an issue in the original code or if the amalgamation script introduced it.
In any case, such single-C programs are very useful for quickly testing tools, so having more of them would be great.
Re: Large single compilation-unit C programs (2006)
#6Re: Large single compilation-unit C programs (2006)
#71283 = continue 1432 = license 1766 = gnu So for every loop continue statement there is a GPL license text :D
I know it's half serious but it's simply not true, in the same way as grepping for "Stallman" in the leaked Windows source code (nobody actually mentioned RMS there, these were false positives). In this case, some headers contain multiple occurrences of GNU in a single header. Then there are several #ifdefs like "__GNU_LIBRARY__" or "__GNUC__" or e-mail addresses of people in the gnu.org domain. In practice, it doesn…
Re: Large single compilation-unit C programs (2006)
#8Earlier quoted context omitted.
I know it's half serious but it's simply not true, in the same way as grepping for "Stallman" in the leaked Windows source code (nobody actually mentioned RMS there, these were false positives). In this case, some headers contain multiple occurrences of GNU in a single header. Then there are several #ifdefs like "__GNU_LIBRARY__" or "__GNUC__" or e-mail addresses of people in the gnu.org domain. In practice, it doesn…
The preprocessor removes the comments? I thought that was the compiler?
Re: Large single compilation-unit C programs (2006)
#91283 = continue 1432 = license 1766 = gnu So for every loop continue statement there is a GPL license text :D
I know it's half serious but it's simply not true, in the same way as grepping for "Stallman" in the leaked Windows source code (nobody actually mentioned RMS there, these were false positives). In this case, some headers contain multiple occurrences of GNU in a single header. Then there are several #ifdefs like "__GNU_LIBRARY__" or "__GNUC__" or e-mail addresses of people in the gnu.org domain. In practice, it doesn…
Re: Large single compilation-unit C programs (2006)
#10Earlier quoted context omitted.
I know it's half serious but it's simply not true, in the same way as grepping for "Stallman" in the leaked Windows source code (nobody actually mentioned RMS there, these were false positives). In this case, some headers contain multiple occurrences of GNU in a single header. Then there are several #ifdefs like "__GNU_LIBRARY__" or "__GNUC__" or e-mail addresses of people in the gnu.org domain. In practice, it doesn…
The preprocessor doesn't remove comments and at least in clang, comments are parsed into the AST.
Edit: just checked and clang behaves just like gcc with -E. Maybe you didn't mean comments but preprocessor directives?