https://gcc.gnu.org/g:e153237a3f993475bb5b2e0758db6be9a005d5da
commit r16-6669-ge153237a3f993475bb5b2e0758db6be9a005d5da Author: Jakub Jelinek <[email protected]> Date: Fri Jan 9 21:54:38 2026 +0100 Update Copyright for gen-evolution.awk and gen-cxxapi-file.py On Fri, Jan 09, 2026 at 05:54:47PM +0000, Joseph Myers wrote: > I think updates to gcc/config/loongarch/genopts/gen-evolution.awk's calls > to copyright_header are needed as well. At present, building for > loongarch can result in files in the source tree being reverted to older > copyright dates because the generation hasn't been updated (discovered via > my glibc bot with GCC mainline stopping updating its GCC source tree > because such modifications appeared in the sources). Of course this also > shows up missing entries in contrib/gcc_update for the three files > generated by gen-evolution.awk. gen-evolution.awk was explicitly blacklisted and so was gen-cxxapi-file.py, both because update-copyright.py matched Copyright line also within the printing code but it wasn't matching the expected form. Fixed by making sure the printing code doesn't match it by using print " Copy" "right (C) " ... in the awk case and Copy{:s}right in the python case (with "" arg added). 2026-01-09 Jakub Jelinek <[email protected]> contrib/ * update-copyright.py (GCCFilter): Don't filter out gen-evolution.awk and gen-cxxapi-file.py. gcc/ * config/loongarch/genopts/gen-evolution.awk: Update copyright year. (copyright_header): Separate parts of Copyright word with " " so that it doesn't get matched by update-copyright.py. (gen_full_header, gen_full_source, gen_full_def): Include 2026 year in the ranges. gcc/cp/ * gen-cxxapi-file.py: Update copyright year. Separate parts of Copyright word with {:s} so that it doesn't get matched by update-copyright.py. Diff: --- contrib/update-copyright.py | 2 -- gcc/config/loongarch/genopts/gen-evolution.awk | 14 ++++++++------ gcc/cp/gen-cxxapi-file.py | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py index 6b31c687f51d..b19a9404155a 100755 --- a/contrib/update-copyright.py +++ b/contrib/update-copyright.py @@ -560,8 +560,6 @@ class GCCFilter (GenericFilter): # Weird ways to compose copyright year 'GmcOptions.cc', - 'gen-evolution.awk', - 'gen-cxxapi-file.py', ]) self.skip_dirs |= set ([ diff --git a/gcc/config/loongarch/genopts/gen-evolution.awk b/gcc/config/loongarch/genopts/gen-evolution.awk index 789be8054b2b..e3aacf968a46 100644 --- a/gcc/config/loongarch/genopts/gen-evolution.awk +++ b/gcc/config/loongarch/genopts/gen-evolution.awk @@ -3,7 +3,7 @@ # A simple script that generates loongarch-evolution.h # from genopts/isa-evolution.in # -# Copyright (C) 2021-2025 Free Software Foundation, Inc. +# Copyright (C) 2021-2026 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -49,10 +49,12 @@ BEGIN { function copyright_header(from_year,to_year) { if (to_year == "") - print " Copyright (C) " from_year \ + # The weird " " in the middle of a word is to make + # contrib/update_copyright.py happy. + print " Copy" "right (C) " from_year \ " Free Software Foundation, Inc." else - print " Copyright (C) " from_year "-" to_year \ + print " Copy" "right (C) " from_year "-" to_year \ " Free Software Foundation, Inc." print "" print "This file is part of GCC." @@ -165,7 +167,7 @@ function gen_full_header() print " Please do not edit this file directly." print "" - copyright_header(2023, 2025) + copyright_header(2023, 2026) print "*/" print "" @@ -201,7 +203,7 @@ function gen_full_source() print " Please do not edit this file directly." print "" - copyright_header(2023, 2025) + copyright_header(2023, 2026) print "*/" print "" @@ -244,7 +246,7 @@ function gen_full_def() print " Please do not edit this file directly." print "" - copyright_header(2025) + copyright_header(2025, 2026) print "*/" print "" diff --git a/gcc/cp/gen-cxxapi-file.py b/gcc/cp/gen-cxxapi-file.py index 9e2cc2c71394..446a166f014a 100644 --- a/gcc/cp/gen-cxxapi-file.py +++ b/gcc/cp/gen-cxxapi-file.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (C) 2022-2025 Free Software Foundation, Inc. +# Copyright (C) 2022-2026 Free Software Foundation, Inc. # This file is part of GCC. # GCC is free software; you can redistribute it and/or modify @@ -95,7 +95,7 @@ def hints(script, content): %struct-type %{{ /* This file is auto-generated by {:s}. */ -/* Copyright (C) 2022-{:s} Free Software Foundation, Inc. +/* Copy{:s}right (C) 2022-{:s} Free Software Foundation, Inc. This file is part of GCC. @@ -130,7 +130,7 @@ struct std_name_hint # as defined in the C++ language specification. The result is used in the # get_std_name_hint functions. # throws an exception. -#""".format(script, time.strftime('%Y'))) +#""".format(script, "", time.strftime('%Y'))) header = '' printed_header = False for e in content:
