On Thu, Oct 31, 2024 at 04:05:30PM -0400, James K. Lowden wrote:
> >From ccb8a64c97461d792fdc39db249980a9ecb63b4bbld.patch 4 Oct 2024 12:01:22 
> >-0400
> From: "James K. Lowden" <jklow...@symas.com>
> Date: Fri 01 Nov 2024 01:50:33 PM EDT
> Subject: [PATCH]  Add 'cobol' to 10 files
> 
> ChangeLog
>       * Makefile.def: Add libgcobol module and cobol language.
>       * configure: Regenerated
>       * configure.ac: Add libgcobol module and cobol language.
> 
> gcc/ChangeLog
>       * common.opt: Add libgcobol module and cobol language.
>       * dwarf2out.cc: Add libgcobol module and cobol language
> 
> gcc/cobol/ChangeLog
>       * LICENSE: Add LICENSE
>       * Make-lang.in: Add Make-lang.in
>       * config-lang.in: Add config-lang.in
>       * lang.opt: Add lang.opt
>       * lang.opt.urls: Add lang.opt.urls

First of all, I think the libgcobol directory needs to be added before this
is committed, so that means the first patch should add gcc/cobol and
libgcobol as new ChangeLog locations, the gcc/cobol/ChangeLog addition patch
should also add libgcobol/ChangeLog, then some patch should add libgcobol
and gcc/cobol content and only the last step would be to wire it up in
toplevel etc.
As for above mentioned ChangeLog entries:
1) all descriptions should start with capital letter (you do that) and
   end with . (only 3 out of 10 descriptions do that)
2) if you add a new file, the description should be
   : New file.
   or (for tests)
   : New test.
   Not Add <the name of the file again>
3) Regenerate. rather than Regenerated.
4) where appropriate, you should mention what you exactly changed.
   So 
        * common.opt (static-libgcobol): New option.
        * dwarf2out.cc (gen_compile_unit_die): Set language to DW_LANG_Cobol85
        for Cobol.  Add appropriate DW_AT_identifier_case for it.
   or
        * Makefile.def (target_modules): Add libgcobol.
        (flags_to_pass): Add GCOBOL_FOR_TARGET.
        (lang_env_dependencies): Add libgcobol entry.
        (dependencies): Let install-target-libgcobol depend on
        install-target-libstdc++-v3.
        (languages): Add cobol.
        * configure.ac (target_libraries): Add target-libgcobol.

> +# Copyright (c) 2019-2022 Symas Corporation

Surely just -2022?

> +#   Copyright (C) 2016 Free Software Foundation, Inc.

Should be 2016-2024

> --- /dev/null
> +++ b/gcc/cobol/lang.opt.urls
> @@ -0,0 +1,29 @@
> +; Copied by Dubner from gcc/rust/ so that compilation could proceed
> +; Autogenerated by regenerate-opt-urls.py from gcc/rust/lang.opt and 
> generated HTML

This file shouldn't be copied but generated.
make regenerate-opt-urls

> --- a/gcc/dwarf2out.cc
> +++ b/gcc/dwarf2out.cc
> @@ -25391,6 +25391,8 @@ gen_compile_unit_die (const char *filename)
>      }
>    else if (strcmp (language_string, "GNU F77") == 0)
>      language = DW_LANG_Fortran77;
> +  else if (strcmp (language_string, "Cobol") == 0)
> +    language = DW_LANG_Cobol85;
>    else if (strcmp (language_string, "GNU Modula-2") == 0)
>      language = DW_LANG_Modula2;
>    else if (dwarf_version >= 3 || !dwarf_strict)
> @@ -25442,6 +25444,9 @@ gen_compile_unit_die (const char *filename)
>        lowercases everything.  */
>        add_AT_unsigned (die, DW_AT_identifier_case, DW_ID_down_case);
>        break;
> +    case DW_LANG_Cobol85:
> +      add_AT_unsigned (die, DW_AT_identifier_case, DW_ID_case_insensitive);

Missing break;

        Jakub

Reply via email to