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

            Bug ID: 88430
           Summary: -Wmissing-attributes warnings when including
                    libquadmath headers
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jb at gcc dot gnu.org
  Target Milestone: ---

When building libgfortran trunk one nowadays (within the past month or two,
maybe?) gets lots of warnings like below:


In file included from ../../../../trunk/libgfortran/libgfortran.h:61,
                 from ../../../../trunk/libgfortran/ieee/ieee_helper.c:26:

../../../../trunk/libgfortran/../libquadmath/quadmath_weak.h:36:33: warning:
‘__qmath_crealq’ specifies less restrictive attribute than its target ‘crealq’:
‘nothrow’ [-Wmissing-attributes]

   36 | #define __qmath3(name) __qmath2(__qmath_ ## name,name,name)
      |                                 ^~~~~~~~

../../../../trunk/libgfortran/../libquadmath/quadmath_weak.h:28:25: note: in
definition of macro ‘__qmath2’

   28 |   static __typeof(type) name __attribute__ ((__weakref__(#name2)));
      |                         ^~~~

../../../../trunk/libgfortran/../libquadmath/quadmath_weak.h:113:1: note: in
expansion of macro ‘__qmath3’

  113 | __qmath3 (crealq)
      | ^~~~~~~~



According to 'git blame', there has been no recent changes to the quadmath
header files recently, thus I suspect the implementation of
-Wmissing-attributes is to blame.

Though since libquadmath lives in-tree, a feasible solution would be to fix the
quadmath headers, if the missing attribute warning otherwise works as intended?
Please reassign to libquadmath if so.

See thread starting at https://gcc.gnu.org/ml/fortran/2018-12/msg00055.html

Reply via email to