This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Update Copyright years


On Mon, 3 Jan 2011 22:40:49 +0100
Basile Starynkevitch <basile@starynkevitch.net> wrote:

> On Mon, 3 Jan 2011 21:53:47 +0100
> Jakub Jelinek <jakub@redhat.com> wrote:
> 
> > Hi!
> > 
> > The attached patch updates Copyright years for files modified in 2010
> > where the Copyright years weren't adjusted before.


On the same line of thoughts, the gengtype.c emitter code emit gt*.[ch]
files with a quite strange copyright year.

The function create_file near line 1446 of gcc/gengtype.c contains


static outf_p
create_file (const char *name, const char *oname)
{
  static const char *const hdr[] = {
    "   Copyright (C) 2004, 2007, 2009 Free Software Foundation, Inc.\n", 
    "\n",
    "This file is part of GCC.\n",
    "\n",
    "GCC is free software; you can redistribute it and/or modify it under\n",
    "the terms of the GNU General Public License as published by the Free\n",
    "Software Foundation; either version 3, or (at your option) any later\n",
    "version.\n",

My feeling is that this is wrong, or at least extremely
counterintuitive. But I am not a US citizen and I am not an good
English speaker (and I am not a lawyer and not an FSF representative).


My intuition would be that gengtype should output a copyright notice 
with the year of the generation. Technically, I would tend to use 
strftime with "%Y" on localtime(&now) (with now obtained by time).

Another possible issue for gengtype used on plugin code is that while plugins
very probably should be GPLv3+ licensed, they probably are not always owned 
by the FSF (MELT being an exception, since it is a GCC branch). 
So the copyright notice emission could be more complex.

I did'nt want to open such a can of worms when submitting my patches to gengtype 
(which are now inside the trunk, the only thing missing is the installation 
of gengtype & gtype.state).

But I find quite strange that gengtype generated source code has such strange 
copyright years. Should we try to fix that before 4.6 release? Should I open a PR?

The technical aspects are simple, but I don't know about the legal copyright year 
of generated code. In my naive opinion, it should be the year of the generation!
(especially since some gengtype generated files like gtype-desc.c are not directly related 
to a particular GCC source file, but to a mixture of many of them).

We could also just leave the code as it is. But I don't understand why gengtype generated code should for ever keep a copyright year of 2004, 2007, 2009 (in particular, for those related to files added in 2010!).

Cheers.
 
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]