GCC Adopts Policy Rejecting Significant AI-Generated Code (linuxiac.com)
- Reference: 0184756574
- News link: https://news.slashdot.org/story/26/07/29/2217254/gcc-adopts-policy-rejecting-significant-ai-generated-code
- Source link: https://linuxiac.com/gcc-adopts-policy-rejecting-significant-ai-generated-code/
> The important point, then, is not whether a developer has used an AI tool at some stage in their work; contributors can use LLMs to discuss ideas, understand existing code, learn about a field they are unfamiliar with, or carry out general research. The limitation lies in the inclusion of copyright-significant material generated by such tools in the code submitted to GCC.
>
> The policy also provides for a few limited exceptions; GCC maintainers are allowed to accept changes that are legally insignificant or trivial and are generated by an LLM, on the condition that they meet the project's normal contribution requirements and the use of an LLM is clearly disclosed.
>
> Furthermore, copyright-significant AI-generated test cases could still be accepted. Since test cases usually involve small programs which are intended to reproduce compiler bugs or to verify certain behavior, the policy deals with them separately from code that is incorporated into GCC itself.
>
> It does not follow that merely looking at or altering the generated code makes it acceptable. By the rules that have been adopted, a contributor cannot take substantial implementation produced by an LLM, clean it up manually, and then treat the resulting patch as if it had been originally written by them. Once a contribution has been derived from generated content, it is still subject to the policy.
[1] https://gcc.gnu.org/pipermail/gcc/2026-July/248628.html
[2] https://linuxiac.com/gcc-adopts-policy-rejecting-significant-ai-generated-code/
I was wondering when FOSS projects would notice (Score:5, Interesting)
The problem is that LLM-generated code has no copyright. Anybody is free to copy it without any limits whatsoever. That does mean that the GPL can potentially go out the window if too much code is LLM-generated or LLM-derived.
And the second problem is that if the LLM stole too much from its training data, then the code retains the original copyright and ownership. Note that "too much" may not be a lot. There have been lawsuits for single lines of code (Java) or even interfaces (Linux Kernel) and these dragged on for years and did massive damage.
Due to these two reasons alone, using LLM code in any project that needs copyright (including all commercial software) is pure foolishness.
Re: (Score:2)
As a practical issue commercial software is almost always closed code, so nobody can see the source and simply search for anything that might share code with anything they have copyright on. The open source code isopen. So if you have anything copyrighted you can search the open source to see if anything looks like it is worth filing a lawsuit over. Especially if you have a competing product. So if you are say Intel you can check to see if any of gcc is similar to Intel’s commercial compiler and
Re: (Score:2)
You are correct. What's kind of crazy is that a lot of the training data is probably GPL code. So if LLM-generated code retains GPL copyright, that's going to provide a lot of work for lawyering companies over the next few decades. And before any lawyers start cheering, there's no guarantee that the lawyering companies will need to hire any lawyers. LLMs can do most of their work already.
And they will know how? (Score:2)
Some are obviously AI-generated. But there as the code quality gets better how would it be distinguishable from human written? Less bugs?
And at that - would they use AI to find out if it was AI-written?
Not banned but not allowed either (Score:4, Insightful)
This must be a difficult to stand for gnu to take at this moment, but I like its nuance.
Basically acknowledging that the code can be critiqued/reviewed by AI, and AI tools are helpful in discovery and research, but that any substantial (>15 lines) contribution of code needs to be human-created.
I think we're at a strange crossroads in AI. Many people are willing to accept the downsides of it (intellectual property, energy resources, ownership by companies that are unlikely to consider your welfare as their priority, privacy issues, downstream cost issues when profit is needed, dependence, negative impact on our own cognition and others) for what are now clear benefits.
There have been many times in past humankind where populations have chosen what makes the day-to-day easier or more productive, despite it clearly being wrong - is AI one of these situations?
Good (Score:2)
It's the compiler. I would be pretty fucking terrified of a compiler that was mostly AI generated. This is the tool you rely on to make your code. It's pretty near the top of the food chain with only assembly and machine code higher up. I can't even imagine the kind of problems and vulnerabilities you could create with AI generated compiler code and a project is large as GCC. I mean if you think State actors haven't thought about targeting open source compilers then that's just being naive.
Re: (Score:2)
See Ken Thompson's "Reflections on Trusting Trust" hack. If someone manages to insert a virus into the compiler, then the source code is irrelevant, it can insert that virus in every program compiled!
"given enough eyeballs, all bugs are shallow" (Score:2)
AI code analysis is much faster than humans. The downside is that a small percentage of the time, it is just WRONG. Nothing wrong with using AI for the initial code generation, but it MUST be carefully reviewed by humans that know what they are doing... as should contributions from any other source.
Copyright (Score:2)
"The limitation lies in the inclusion of copyright-significant material generated by such tools in the code submitted to GCC"
This seems like the important bit. Isn't there significant concern over whether LLM generated code can be copyrighted?
Re: (Score:3)
It has already been established that LLM code either has no copyright whatsoever or (worse) it retains the original copyright and ownership if it is too similar to things in its training data. This is a really bad legal minefield.
Re: (Score:2)
Winner! Winner! Chicken Dinner!
Yep, even when AI generated code is human reviewed to determine that the code does what it looks like it should, and has no subtle issues (or only very very subtle ones!), you still have the huge legal issues (the exact ones you identified).
Re: (Score:2)
Thanks, that makes the AI ban makes sense; they are afraid of AI generated code generating copyright infringement issues. The AI cannot claim it has never seen the code being infringed.