GCC AI Policy: The 15-Line Rule Is Not in the Text

The GCC AI policy declines any legally significant contribution that includes LLM-generated content or derives from it. GCC is the compiler suite that turns C, C++ and other source code into programs a machine can run, and an LLM (large language model) is the kind of AI that generates code or text from a prompt. "Legally significant" is the policy's own phrase, and it comes with no number; the figure of 15 lines is from a separate GNU guide.

On July 29, 2026, David Edelsohn announced on the GCC mailing list that the GCC Steering Committee had accepted the policy recommended by the GCC AI Policy Working Group. Jonathan Wakely led the group, and its members were Carlos O'Donell, Sudakshina Das, Jason Merrill, Joel Sherrill, Sam James, Robin Dapp and Arthur Cohen. The committee said it expects the policy to keep evolving and will revisit it periodically.

So the policy sets a test of legal significance, not a ban on every LLM-assisted patch. It has one accepted case and two carve-outs:

  • Accepted: maintainers may take a legally insignificant LLM-generated contribution if it meets the usual requirements for any contribution and is clearly marked.
  • Exception: maintainers may take legally significant contributions to test cases, even when an LLM generated all or part of them.
  • Excluded: code that does not primarily belong to GCC but is imported from other projects, such as libsanitizer, is outside the policy.
The GCC Steering Committee has accepted the recommended policy of the GCC AI Policy Working Group. The policy is described in the following document preview / pull request in Forge, which will be committed to the GCC website: / We expect the policy to continue to evolve and will revisit it periodically. We wish to thank Jonathan Wakely for his leadership of the working group and the members of the working group: Carlos O'Donell, Sudakshina Das, Jason Merrill, Joel Sherrill, Sam James, Robin Dapp, and Arthur Cohen. — from the announcement of the committee's acceptance and the working group's membership
View official source →
For the time being, the GNU Compiler Collection (GCC) policy is to decline any legally significant contributions which include LLM-generated content or are derived from LLM-generated content. The GCC maintainers are free to accept legally insignificant contributions generated by an LLM as long as they meet the usual prerequisites for any contribution and the contribution is clearly marked. / As an exception, the GCC maintainers are free to accept legally significant contributions to test cases, generated in whole or in part by an LLM. / This policy does not apply to code which does not primarily belong to the GCC project, but is imported from other projects for convenience or to satisfy prerequisites (e.g. libsanitizer). — from the statement of what is declined, the test-case exception and the exclusion for imported code
View official source →

The GCC AI policy contains no line count. The number 15 comes from GNU's guide for maintainers of GNU software, in the section on legally significant changes. The policy page uses only the words "legally significant" and does not cite the guide.

The guide sets the threshold for copyright paperwork. A person who contributes more than around 15 lines of legally significant code and/or text needs to provide copyright papers for that contribution.

A change of just a few lines, fewer than 15 or so, is not legally significant. The guide adds two points that change how the number reads:

  • A regular series of repeated changes is not legally significant. The guide's example is renaming a symbol, even when the symbol is renamed in many places.
  • Small changes add up. A series of minor changes by the same person can become a significant contribution. What counts is the person's total, and it does not matter which part came when. When recording a small patch, the guide says to look for earlier changes by the same person first and check whether the past and present changes together are legally significant.

Read together, "around 15 lines" is a rough size for one person's total contribution, and it is not a per-patch allowance. The guide itself hedges the number ("around", "or so"), and the GCC policy sets no cutoff of its own.

If a person contributes more than around 15 lines of code and/or text that is legally significant for copyright purposes, we need copyright papers for that contribution, as described above. A change of just a few lines (less than 15 or so) is not legally significant for copyright. A regular series of repeated changes, such as renaming a symbol, is not legally significant even if the symbol has to be renamed in many places. / …Keep in mind, however, that a series of minor changes by the same person can add up to a significant contribution. What counts is the total contribution of the person; it is irrelevant which parts of it were contributed when. — from the definition of the threshold, repeated changes and accumulation
View official source →

Assisted-by tag on every LLM commit under the GCC AI policy

Every commit message for a contribution of LLM-generated content must include an "Assisted-by:" tag. A commit message is the note attached to each change in the project's history, and the tag is a labeled line in it that shows an LLM helped produce the change.

The wording is "any contribution", so the tag is not limited to large patches. A small bug fix drafted with an LLM can be accepted when it is legally insignificant, meets the usual requirements and is clearly marked, and its commit message still has to carry the Assisted-by tag. The same applies to the test-case exception above: a legally significant test-case contribution can be accepted, but the tag is still required.

The tag only records that a machine took part. It does not replace the human steps the policy requires.

The commit message for any contribution of LLM-generated content must include an “Assisted-by:” tag. — from the commit message requirement
View official source →

Signed-off-by and the Developer Certificate of Origin: humans only

Only a human may add the "Signed-off-by:" tag, which certifies the Developer Certificate of Origin (DCO). The DCO is a short statement a contributor makes about where a change came from and their right to submit it, and Signed-off-by is the line in a commit message that attaches that statement to the change. The policy puts the rest of the responsibility on people as well:

  • Every contribution must be submitted by a human who understands the changes and is prepared to answer questions about them.
  • The decision to include a contribution in the project must also be made by a human.
  • An LLM may not commit code to the project repository.

In practice, a contributor who uses an LLM still has to understand the change, be ready to answer questions about it and sign off on it personally. The policy bars the tool from signing off or committing.

All contributions must be submitted by a human who understands the changes and is prepared to answer questions about them. The decision to include the contribution in the project must also be made by a human. Only a human may provide the “Signed-off-by:” tag certifying the Developer Certificate of Origin (DCO). An LLM may not commit code to the project repository. — from the responsibilities assigned to humans
View official source →

Research, review and debugging fall outside the policy

The policy does not cover AI used for research, analysis, bug discovery and reporting, patch review or debugging, as long as the output is not included in the contributions to the project. The policy adds two notes. AI output used for bug discovery and reporting should not be sent verbatim without due consideration, and AI in patch review should support human review, not replace it.

Personal use is outside the policy too. Screen readers, text-to-speech, direct translation and spelling or grammar assistance are named, provided the contributor verifies the tool's output.

The boundary is the output. If an LLM helps someone track down a bug and the person then writes the fix by hand, the policy does not apply. If the LLM's output is pasted into the patch, the policy applies, including the legal-significance test and the Assisted-by tag.

This policy does not apply to a contributor's other uses of AI including the use of these tools to enable them to work with their own computing devices e.g. screen readers, text-to-speech, direct translations, spelling or grammar assistance, where the contributor verifies the output of the tool. / This policy does not apply to a contributor's use of AI for the purposes of research, analysis, bug discovery and reporting (output should not be sent verbatim without due consideration), patch review (supporting human review, not replacing it) and debugging, so long as the output is not included in the contributions to the project. If the output is included in the contributions to the project then this policy would apply. — from the exclusions for personal use and for research, review and debugging
View official source →

Three points sum up the GCC AI policy. The test for declining a contribution is "legally significant", not a number of lines. The figure of around 15 lines belongs to GNU's guide for maintainers, where it is a rough size, and under that guide small changes from one person are counted together.

The policy is a "for the time being" rule. It is expected to evolve with the community or as the overall GNU Project position is updated, and it will be reviewed by the start of 2027 at the latest.

The policy document is published under CC0 1.0 Universal. To check which lines differ between two versions of a text, try the text comparison tool below.

This policy is expected to evolve with the community or as the overall GNU Project position is updated. At the latest the policy will be reviewed at the start of 2027. — from the review timeline
View official source →

FAQ

Does GCC reject AI-generated code of 15 lines or more?
Not in those words. The policy text has no line count and never mentions 15. It declines legally significant contributions that include or derive from LLM-generated content. The figure of around 15 lines appears in GNU's separate guide for maintainers.
Where does the number 15 come from?
From the GNU guide for maintainers of GNU software. It says a person who contributes more than around 15 lines of code and/or text that is legally significant for copyright needs to provide copyright papers. A change of fewer than 15 or so lines is not legally significant.
Are small AI-generated patches accepted?
Small is not the policy's test. Maintainers are free to accept legally insignificant LLM-generated contributions when they meet the usual prerequisites and are clearly marked. The commit message must also carry an Assisted-by tag.
Can an LLM add a Signed-off-by line or commit to GCC?
No. Only a human may provide the Signed-off-by tag, which certifies the Developer Certificate of Origin, and an LLM may not commit code to the project repository.
Is using AI for research or debugging covered by the policy?
No, provided the output stays out of the contributions. Research, analysis, bug discovery and reporting, patch review and debugging are outside the policy. If the output is included in a contribution, the policy applies.