News for hackers. Stuff that matters.
Re:Large single compilation-unit C programs (2006) by Sadkov on Thursday October 08, 2020 @04:31AM (#24717125)
1283 = continue 1432 = license 1766 = gnu

So for every loop continue statement there is a GPL license text :D

Re:Large single compilation-unit C programs (2006) by dvfjsdhgfv on Friday October 09, 2020 @05:05AM (#24728107)
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'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) by colejohnson66 on Friday October 09, 2020 @06:50AM (#24728630)
The preprocessor removes the comments? I thought that was the compiler?
Re:Large single compilation-unit C programs (2006) by zabzonk on Friday October 09, 2020 @06:53AM (#24728652)
Re:Large single compilation-unit C programs (2006) by gridlockd on Friday October 09, 2020 @06:55AM (#24728665)
The preprocessor doesn't remove comments and at least in clang, comments are parsed into the AST.
Re:Large single compilation-unit C programs (2006) by dvfjsdhgfv on Friday October 09, 2020 @07:36AM (#24728892)
Well, according to C99, it should. Section "5.1.1.2 Translation phases" says (in phase 3): "Each comment is replaced by one space character."

Edit: just checked and clang behaves just like gcc with -E. Maybe you didn't mean comments but preprocessor directives?

Re:Large single compilation-unit C programs (2006) by tom_mellior on Friday October 09, 2020 @08:02AM (#24729017)
Clang, like GCC, has -C and -CC flags to preserve comments during preprocessing. However, these are really flags for the underlying preprocessor. Your parent might be thinking of some application of the Clang frontend that does not run preprocessing. For example, clang-format will probably not want to preprocess the code nor strip out comments.
Re:Large single compilation-unit C programs (2006) by gridlockd on Friday October 09, 2020 @08:58AM (#24729427)
You are correct, my bad.