https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119225

            Bug ID: 119225
           Summary: avr-mmcu.texi:15: warning: @anchor should not appear
                    on @item line
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
                CC: gjl at gcc dot gnu.org
  Target Milestone: ---
            Target: avr

The generated file gcc/doc/avr-mmcu.texi contains lines like:

@item @anchor{avr2}avr2

This generates warnings:

avr-mmcu.texi:15: warning: @anchor should not appear on @item line
avr-mmcu.texi:19: warning: @anchor should not appear on @item line
avr-mmcu.texi:23: warning: @anchor should not appear on @item line
avr-mmcu.texi:27: warning: @anchor should not appear on @item line
avr-mmcu.texi:31: warning: @anchor should not appear on @item line
avr-mmcu.texi:35: warning: @anchor should not appear on @item line
avr-mmcu.texi:39: warning: @anchor should not appear on @item line
avr-mmcu.texi:43: warning: @anchor should not appear on @item line
avr-mmcu.texi:47: warning: @anchor should not appear on @item line
avr-mmcu.texi:51: warning: @anchor should not appear on @item line
avr-mmcu.texi:55: warning: @anchor should not appear on @item line
avr-mmcu.texi:59: warning: @anchor should not appear on @item line
avr-mmcu.texi:63: warning: @anchor should not appear on @item line
avr-mmcu.texi:67: warning: @anchor should not appear on @item line
avr-mmcu.texi:71: warning: @anchor should not appear on @item line
avr-mmcu.texi:75: warning: @anchor should not appear on @item line
avr-mmcu.texi:79: warning: @anchor should not appear on @item line

This would fix it:

--- a/gcc/config/avr/gen-avr-mmcu-texi.cc
+++ b/gcc/config/avr/gen-avr-mmcu-texi.cc
@@ -190,7 +190,7 @@ int main (void)

          for (i = 0; i < ARRAY_SIZE (avr_texinfo); i++)
            if (arch_id == avr_texinfo[i].arch_id)
-             printf ("@item @anchor{%s}%s\n%s\n", mcu->name, mcu->name,
+             printf ("@anchor{%s}\n@item %s\n%s\n", mcu->name, mcu->name,
                      avr_texinfo[i].texinfo);
        }
       else if (arch_id == (enum avr_arch_id) mcu->arch_id)

Reply via email to