Re: GCC AI Policy Announcement

Richard Biener via Gcc <[email protected]> Tue, 4 Aug 2026 12:54:23 +0200
Newsgroups gmane.comp.gcc.devel,gmane.comp.gcc.fortran
Message-ID <CAFiYyc0JvdCGA=t15DE_nn0TwOu8zLZyfT6x3Qo_Ca5d0M9ByQ@mail.gmail.com>
On Tue, Aug 4, 2026 at 9:52=E2=80=AFAM Alexander Monakov <[email protected]=
u> wrote:
>
>
> On Tue, 4 Aug 2026, Richard Biener via Gcc wrote:
>
> > > 1 b)
> > >
> > > LLM output which reproduces existing code used for training,
> > > which falls under somebody else's copyright.
> > >
> > > This should not pose a problem, at least if it is working
> > > within gcc and its support libraries - in order to work at all,
> > > such code would have to realistically come from a gcc fork itself,
> > > which would then be under the GPL.
> >
> > That was my line of thinking as well.  In the end it boils down to
> > the definition of derived work.  Also note that in the end any
> > plaintiff would have to prove infringement.  We possibly make
> > that easier by labelling commits.  It's also always possible to
> > revert a change.
>
> I'm going to argue against this point, but it doesn't mean I concede
> the others; my opposition to use of so-called AI is broader than this.
>
> (to be clear, the point is "would have to realistically come from a gcc
> fork itself")
>
> On a technical level, how is the claim true at all, especially for
> runtime libraries, like libstdc++? They generally host and import new cod=
e
> that has nothing to do with the compiler proper. I don't see how the
> claim would hold for std::regex or std::format, for instance.
>
> It's not true for gcc proper either, as it occasionally adds code that is
> novel and unrelated to the rest of the compiler (to name two such instanc=
es
> I contributed: gcc/sort.cc and search_line_ssse3 in libcpp).
>
> On a policy level, since when is code being under the GPL is a sufficient
> condition for adding it to GCC? The necessary condition that I know goes
> either via copyright assignment, or under DCO's certification chain.
>
> And on a social level, is that actually the stance GCC wants to take?
> That when the actual author of a piece of code that was imported via
> an LLM asks about their code appearing uncredited, the response will be
> "it's our derived work now" and "prove it or go away"?

Huh, no.  If somebody claims authorship we can offer attribution,
removal or rework.  "go away" is never a good strategy.

> This is not what I hope the community stands for.

As you say there's process issues to be resolved - all I wanted to add
here towards the "LLM spits out copyright-infested code" is that,
if it looks like GCC code, for example by using GIMPLE or RTL
APIs, uses GCC data structures, then it is more a derivative work of GCC
than of something else.  That obviously does not hold true for changes
to _all_ parts of GCC, you name some counter-examples.

This is mainly why I think the current policy takes the easy way out,
not reflecting upon all the issues that come up when we do allow
substantial (aka legally relevant) LLM [assisted] contributions.

Richard.

> Alexander