This is the mail archive of the gcc-bugs@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]

[Bug middle-end/88381] New: __builtin_thread_pointer missing documentation, defined as implicit_p


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

            Bug ID: 88381
           Summary: __builtin_thread_pointer missing documentation,
                    defined as implicit_p
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The __builtin_thread_pointer and __builtin_thread_pointer and
__builtin_set_thread_pointer functions added in r192364 (or rather moved from a
number of back-ends to the middle-end) are missing documentation.

In addition, they are also the only "non-ansi" built-ins that have the
IMPLICIT_P flag set in the builtin_info array (by non-ansi I mean those added
by a call to  def_builtin_1() with the nonansi_p argument set).  I don't think
this causes any problems for programs, but it's confusing when working with the
GCC sources -- see the discussion here:
https://gcc.gnu.org/ml/gcc-patches/2018-11/msg02532.html

I haven't read the whole history behind the change in r192364 but my best guess
is that while the IMPLICIT_P setting is likely correct (same as for
__builtin_return_address, for instance), the nonansi_p setting is not.  The
built-ins are defined via the DEF_BUILTIN macro when they probably should be
defined by DEF_GCC_BUILTIN instead.  The former is typically used to define
other macros (like for library built-ins) while the latter is for GCC
intrinsics with no corresponding library functions.  Using the latter would
have the effect of calling def_builtin_1() with nonansi_p clear.

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