public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/107656] New: post sphinx conversion, can't tell between a target macro or a target hook
@ 2022-11-11 23:27 pinskia at gcc dot gnu.org
  2022-11-11 23:30 ` [Bug middle-end/107656] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-11 23:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107656
           Summary: post sphinx conversion, can't tell between a target
                    macro or a target hook
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Blocks: 107655
  Target Milestone: ---

https://gcc.gnu.org/onlinedocs/gccint/target-macros/storage-layout.html
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gccint/Storage-Layout.html#Storage-Layout

For an example PROMOTE_MODE, in the texinfo version, it has:
Macro: PROMOTE_MODE (m, unsignedp, type)

while for TARGET_C_EXCESS_PRECISION:
Target Hook: enum flt_eval_method TARGET_C_EXCESS_PRECISION (enum
excess_precision_type type)


But in the sphinx version, it does not list if it was a macro or a hook. Which
makes these confusing of what each is.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107655
[Bug 107655] [meta-bug] tracker bug for issues encountered in the
texinfo-to-sphinx migration

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/107656] post sphinx conversion, can't tell between a target macro or a target hook
  2022-11-11 23:27 [Bug middle-end/107656] New: post sphinx conversion, can't tell between a target macro or a target hook pinskia at gcc dot gnu.org
@ 2022-11-11 23:30 ` pinskia at gcc dot gnu.org
  2022-11-13 19:30 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-11 23:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.. c:macro:: PROMOTE_MODE (m, unsignedp, type)

.. function:: enum flt_eval_method TARGET_C_EXCESS_PRECISION (enum
excess_precision_type type)

It is really hard to tell the difference in the generated page though;
especially since target macros and hooks can sometimes take arguments.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/107656] post sphinx conversion, can't tell between a target macro or a target hook
  2022-11-11 23:27 [Bug middle-end/107656] New: post sphinx conversion, can't tell between a target macro or a target hook pinskia at gcc dot gnu.org
  2022-11-11 23:30 ` [Bug middle-end/107656] " pinskia at gcc dot gnu.org
@ 2022-11-13 19:30 ` marxin at gcc dot gnu.org
  2022-11-13 19:43 ` pinskia at gcc dot gnu.org
  2022-11-14  8:43 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-13 19:30 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2022-11-13

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Yes, it's a small drawback. One can distinguish macros by missing return type,
but I can imagine adding a

.. note::

  Target macro

for such macros that have arguments. These w/o arguments are hopefully
distinguishable from hooks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/107656] post sphinx conversion, can't tell between a target macro or a target hook
  2022-11-11 23:27 [Bug middle-end/107656] New: post sphinx conversion, can't tell between a target macro or a target hook pinskia at gcc dot gnu.org
  2022-11-11 23:30 ` [Bug middle-end/107656] " pinskia at gcc dot gnu.org
  2022-11-13 19:30 ` marxin at gcc dot gnu.org
@ 2022-11-13 19:43 ` pinskia at gcc dot gnu.org
  2022-11-14  8:43 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-13 19:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> Yes, it's a small drawback.

IT IS NOT A SMALL DRAWBACK. It is a huge one really. Especially when a new
developer is trying to write a backend, they can't figure out if it was a
target hook or a target macro one is. The return type is only part is not
described anywhere to say it is the difference either. Epsecially when reading
each of these sections seperately.

I only noticed this because I am going to try to improve the documentation on
some of these and this caught my eye and made me even more confused (I looked
at the new documentation first and I was wait isn't one a target hook and then
I had to go look at the previous texinfo documentation to see that was true).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/107656] post sphinx conversion, can't tell between a target macro or a target hook
  2022-11-11 23:27 [Bug middle-end/107656] New: post sphinx conversion, can't tell between a target macro or a target hook pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-11-13 19:43 ` pinskia at gcc dot gnu.org
@ 2022-11-14  8:43 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-14  8:43 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
The Sphinx documentation has been reverted:
https://gcc.gnu.org/pipermail/gcc/2022-November/239983.html

Thus, I'm closing this as won't fix.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-14  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 23:27 [Bug middle-end/107656] New: post sphinx conversion, can't tell between a target macro or a target hook pinskia at gcc dot gnu.org
2022-11-11 23:30 ` [Bug middle-end/107656] " pinskia at gcc dot gnu.org
2022-11-13 19:30 ` marxin at gcc dot gnu.org
2022-11-13 19:43 ` pinskia at gcc dot gnu.org
2022-11-14  8:43 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).