Hello Basile, Thank you for your message (and for your past contributions to GCC! I'm grateful for that, as I'm sure are many others on this list.)
If I understand correctly, I think you're asking when it would be appropriate to add SPDX short-form license identifiers to *generated* code files. With apologies for giving a non-answer, my inclination is that this is probably mostly outside the scope of the SPDX project to have a particular view or recommendation on this topic. My guess is that it's going to be a very case-by-case, fact-specific question in each instance, regarding whether a particular generated file contains copyrightable / licensable content. For example, a "generated" file might consist fully, or partially, of transformed content which reflects copyrightable expression from the source files that it is transforming. Or it might contain content which has no copyrightable expression; or might be generated through a process which results in the outputs not being subject to copyright. All of these might also vary from jurisdiction to jurisdiction. All of that is to say: SPDX doesn't really take positions that would involve giving "legal guidance" about how these questions come out. I would say that if someone decides that they are going to distribute "generated" content, AND they decide that they are going to apply a license to it, then the SPDX license identifiers provide a mechanism to communicate that information. But the SPDX project can't really advise about the underlying copyrightability / licensing questions and boundaries. A related but separate technical question is: how does one actually insert the license ID into a "generated" file? For this, you might take a look at the REUSE Software specification at https://reuse.software/spec-3.3/, which provides guidance about different ways to utilize SPDX license IDs where it's infeasible to incorporate them directly into a particular file. Best regards, Steve On Sat, May 9, 2026 at 7:11 AM Basile Starynkevitch via lists.spdx.org <[email protected]> wrote: > Hello all, > > > (I am French, grand-father and open source developer; I did contribute > to GCC: https://arxiv.org/abs/1109.0779 ... but I am not a lawyer). > > What is the SPDX policies on generated C or C++ code (or some other > language like GNU bash etc...) > > It could be generated by literate programming tools like > https://github.com/nrnrnr/noweb > > It could even be automatically modified in parts by some clever GNU > emacs extension which operates on parts (consecutive lines) of a C or > C++ file. > > Qt also generates C++ code. > > My intuition is that SPDX notation should apply only to human coded > files and (probably) just human coded parts of automatically modified C > or C++ files. > > But then how to do that? What conventions should be followed. > (I do add an SPDX line at start of open source files, but they might be > modified later). > > > As a counter example or food for thought, all C files on > https://github.com/bstarynk/caia-pitrat are self generated. > > thanks for reading. > > Regards > -- > > Basile STARYNKEVITCH > <[email protected]> > 8 rue de la Faïencerie > http://starynkevitch.net/Basile/ > 92340 Bourg-la-Reine > https://github.com/bstarynk > France > https://github.com/RefPerSys/RefPerSys > https://orcid.org/0000-0003-0908-5250 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#6156): https://lists.spdx.org/g/Spdx-tech/message/6156 Mute This Topic: https://lists.spdx.org/mt/119227874/21656 Group Owner: [email protected] Unsubscribe: https://lists.spdx.org/g/Spdx-tech/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
