LCOV - code coverage report
Current view: top level - gcc - builtin-attrs.def Coverage Total Hit
Test: gcc.info Lines: 100.0 % 175 175
Test Date: 2026-02-28 14:20:25 Functions: - 0 0
Legend: Lines:     hit not hit

            Line data    Source code
       1              : /* Copyright (C) 2001-2026 Free Software Foundation, Inc.
       2              :    Contributed by Joseph Myers <jsm28@cam.ac.uk>.
       3              : 
       4              : This file is part of GCC.
       5              : 
       6              : GCC is free software; you can redistribute it and/or modify it under
       7              : the terms of the GNU General Public License as published by the Free
       8              : Software Foundation; either version 3, or (at your option) any later
       9              : version.
      10              : 
      11              : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      12              : WARRANTY; without even the implied warranty of MERCHANTABILITY or
      13              : FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      14              : for more details.
      15              : 
      16              : You should have received a copy of the GNU General Public License
      17              : along with GCC; see the file COPYING3.  If not see
      18              : <http://www.gnu.org/licenses/>.  */
      19              : 
      20              : /* This header provides a declarative way of describing the attributes
      21              :    that are applied to some built-in functions by default.  Attributes
      22              :    that are meant to be used by user-defined functions but aren't used
      23              :    by any built-ins, or attributes that apply to types or variables
      24              :    but not to functions need not and should not be defined here.
      25              : 
      26              :    Before including this header, you must define the following macros.
      27              :    In each case where there is an ENUM, it is an identifier used to
      28              :    reference the tree in subsequent definitions.
      29              : 
      30              :    DEF_ATTR_NULL_TREE (ENUM)
      31              : 
      32              :      Constructs a NULL_TREE.
      33              : 
      34              :    DEF_ATTR_INT (ENUM, VALUE)
      35              : 
      36              :      Constructs an INTEGER_CST with value VALUE (an integer representable
      37              :      in HOST_WIDE_INT).
      38              : 
      39              :    DEF_ATTR_IDENT (ENUM, STRING)
      40              : 
      41              :      Constructs an IDENTIFIER_NODE for STRING.
      42              : 
      43              :    DEF_ATTR_TREE_LIST (ENUM, PURPOSE, VALUE, CHAIN)
      44              : 
      45              :      Constructs a TREE_LIST with given PURPOSE, VALUE and CHAIN (given
      46              :      as previous ENUM names).  */
      47              : 
      48       229921 : DEF_ATTR_NULL_TREE (ATTR_NULL)
      49              : 
      50              : /* Construct a tree for a given integer and a list containing it.  */
      51              : #define DEF_ATTR_FOR_INT(VALUE)                                 \
      52              :   DEF_ATTR_INT (ATTR_##VALUE, VALUE)                    \
      53              :   DEF_ATTR_TREE_LIST (ATTR_LIST_##VALUE, ATTR_NULL,     \
      54              :                       ATTR_##VALUE, ATTR_NULL)
      55       229921 : DEF_ATTR_FOR_INT (0)
      56       229946 : DEF_ATTR_FOR_INT (1)
      57       229946 : DEF_ATTR_FOR_INT (2)
      58       229971 : DEF_ATTR_FOR_INT (3)
      59       229921 : DEF_ATTR_FOR_INT (4)
      60       229921 : DEF_ATTR_FOR_INT (5)
      61       229921 : DEF_ATTR_FOR_INT (6)
      62              : #undef DEF_ATTR_FOR_INT
      63              : 
      64              : /* Construct a tree for a given string and a list containing it.  */
      65              : #define DEF_ATTR_FOR_STRING(ENUM, VALUE)                                        \
      66              :   DEF_ATTR_STRING (ATTR_##ENUM, VALUE)                  \
      67              :   DEF_ATTR_TREE_LIST (ATTR_LIST_##ENUM, ATTR_NULL,      \
      68              :                       ATTR_##ENUM, ATTR_NULL)
      69       229921 : DEF_ATTR_FOR_STRING (STR1, "1 ")
      70       229921 : DEF_ATTR_FOR_STRING (STRERRNOC, ".C")
      71       229921 : DEF_ATTR_FOR_STRING (STRERRNOP, ".P")
      72              : #undef DEF_ATTR_FOR_STRING
      73              : 
      74              : /* Construct a tree for a list of two integers.  */
      75              : #define DEF_LIST_INT_INT(VALUE1, VALUE2)                                 \
      76              :   DEF_ATTR_TREE_LIST (ATTR_LIST_##VALUE1##_##VALUE2, ATTR_NULL,          \
      77              :                       ATTR_##VALUE1, ATTR_LIST_##VALUE2)
      78       229921 : DEF_LIST_INT_INT (1,0)
      79       229921 : DEF_LIST_INT_INT (1,2)
      80       229946 : DEF_LIST_INT_INT (1,3)
      81       229921 : DEF_LIST_INT_INT (1,4)
      82       229921 : DEF_LIST_INT_INT (1,5)
      83       229921 : DEF_LIST_INT_INT (2,0)
      84       229946 : DEF_LIST_INT_INT (2,3)
      85       229921 : DEF_LIST_INT_INT (3,0)
      86       229921 : DEF_LIST_INT_INT (3,4)
      87       229921 : DEF_LIST_INT_INT (4,0)
      88       229921 : DEF_LIST_INT_INT (4,5)
      89       229921 : DEF_LIST_INT_INT (5,0)
      90       229921 : DEF_LIST_INT_INT (5,6)
      91              : #undef DEF_LIST_INT_INT
      92              : 
      93              : /* Construct a tree for a list of three integers.  */
      94              : #define DEF_LIST_INT_INT_INT(VALUE1, VALUE2, VALUE3)                     \
      95              :   DEF_ATTR_TREE_LIST (ATTR_LIST_##VALUE1##_##VALUE2##_##VALUE3,          \
      96              :                       ATTR_NULL, ATTR_##VALUE1,                          \
      97              :                       ATTR_LIST_##VALUE2##_##VALUE3)
      98       229921 : DEF_LIST_INT_INT_INT (1,2,3)
      99              : #undef DEF_LIST_INT_INT_INT
     100              : 
     101              : /* Construct trees for identifiers used in built-in function attributes.
     102              :    The construction contributes to startup costs so only attributes that
     103              :    are used to define built-ins should be defined here.  */
     104       229921 : DEF_ATTR_IDENT (ATTR_ALLOC_SIZE, "alloc_size")
     105       231212 : DEF_ATTR_IDENT (ATTR_COLD, "cold")
     106       231212 : DEF_ATTR_IDENT (ATTR_CONST, "const")
     107       229921 : DEF_ATTR_IDENT (ATTR_FORMAT, "format")
     108       229921 : DEF_ATTR_IDENT (ATTR_FORMAT_ARG, "format_arg")
     109       229921 : DEF_ATTR_IDENT (ATTR_MALLOC, "malloc")
     110       229956 : DEF_ATTR_IDENT (ATTR_NONNULL, "nonnull")
     111       229946 : DEF_ATTR_IDENT (ATTR_NONNULL_IF_NONZERO, "nonnull_if_nonzero")
     112       231212 : DEF_ATTR_IDENT (ATTR_NORETURN, "noreturn")
     113       231212 : DEF_ATTR_IDENT (ATTR_NOTHROW, "nothrow")
     114       231212 : DEF_ATTR_IDENT (ATTR_LEAF, "leaf")
     115       229921 : DEF_ATTR_IDENT (ATTR_FNSPEC, "fn spec")
     116       229921 : DEF_ATTR_IDENT (ATTR_PRINTF, "printf")
     117       229921 : DEF_ATTR_IDENT (ATTR_ASM_FPRINTF, "asm_fprintf")
     118       229921 : DEF_ATTR_IDENT (ATTR_GCC_DIAG, "gcc_diag")
     119       229921 : DEF_ATTR_IDENT (ATTR_GCC_CDIAG, "gcc_cdiag")
     120       229921 : DEF_ATTR_IDENT (ATTR_GCC_CXXDIAG, "gcc_cxxdiag")
     121       229936 : DEF_ATTR_IDENT (ATTR_PURE, "pure")
     122       229921 : DEF_ATTR_IDENT (ATTR_NOVOPS, "no vops")
     123       229921 : DEF_ATTR_IDENT (ATTR_SCANF, "scanf")
     124       229921 : DEF_ATTR_IDENT (ATTR_SENTINEL, "sentinel")
     125       229921 : DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon")
     126       229921 : DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime")
     127       229936 : DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
     128       229921 : DEF_ATTR_IDENT (ATTR_TM_REGPARM, "*tm regparm")
     129       229921 : DEF_ATTR_IDENT (ATTR_TM_TMPURE, "transaction_pure")
     130       229921 : DEF_ATTR_IDENT (ATTR_RETURNS_TWICE, "returns_twice")
     131       229921 : DEF_ATTR_IDENT (ATTR_RETURNS_NONNULL, "returns_nonnull")
     132       229921 : DEF_ATTR_IDENT (ATTR_WARN_UNUSED_RESULT, "warn_unused_result")
     133       229921 : DEF_ATTR_IDENT (ATTR_CALLBACK, " callback")
     134              : 
     135       229921 : DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LIST, ATTR_NOVOPS, ATTR_NULL, ATTR_NULL)
     136              : 
     137       229921 : DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOVOPS_LIST)
     138              : 
     139       229921 : DEF_ATTR_TREE_LIST (ATTR_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NULL)
     140              : 
     141       231212 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LIST, ATTR_NOTHROW, ATTR_NULL, ATTR_NULL)
     142              : 
     143       231212 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_LIST)
     144              : 
     145       229921 : DEF_ATTR_TREE_LIST (ATTR_NOVOPS_NOTHROW_LEAF_LIST, ATTR_NOVOPS, \
     146              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     147       229921 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LIST, ATTR_CONST,        \
     148              :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     149       231212 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_CONST,   \
     150              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     151       229921 : DEF_ATTR_TREE_LIST (ATTR_ERRNOCONST_NOTHROW_LEAF_LIST, ATTR_FNSPEC,\
     152              :                         ATTR_LIST_STRERRNOC, ATTR_NOTHROW_LEAF_LIST)
     153       229921 : DEF_ATTR_TREE_LIST (ATTR_ERRNOPURE_NOTHROW_LEAF_LIST, ATTR_FNSPEC,\
     154              :                         ATTR_LIST_STRERRNOP, ATTR_NOTHROW_LEAF_LIST)
     155       229921 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LIST, ATTR_PURE,          \
     156              :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     157       229921 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LEAF_LIST, ATTR_PURE,     \
     158              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     159       229921 : DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN,  \
     160              :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     161       231212 : DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_NORETURN,\
     162              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     163       231212 : DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST, ATTR_COLD,\
     164              :                         ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     165       229921 : DEF_ATTR_TREE_LIST (ATTR_RT_NOTHROW_LEAF_LIST, ATTR_RETURNS_TWICE,\
     166              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     167       229921 : DEF_ATTR_TREE_LIST (ATTR_COLD_NOTHROW_LEAF_LIST, ATTR_COLD,\
     168              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     169       229921 : DEF_ATTR_TREE_LIST (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST, ATTR_COLD,\
     170              :                         ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     171       229926 : DEF_ATTR_TREE_LIST (ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST, ATTR_CONST,\
     172              :                         ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     173       229926 : DEF_ATTR_TREE_LIST (ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST, ATTR_COLD,\
     174              :                         ATTR_NULL, ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST)
     175       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC,      \
     176              :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     177       229921 : DEF_ATTR_TREE_LIST (ATTR_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST, ATTR_WARN_UNUSED_RESULT, \
     178              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     179       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST, ATTR_MALLOC,      \
     180              :                         ATTR_NULL, ATTR_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     181       229921 : DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LIST, ATTR_SENTINEL,  \
     182              :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     183       229921 : DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LEAF_LIST, ATTR_SENTINEL,     \
     184              :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     185       229921 : DEF_ATTR_TREE_LIST (ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST, ATTR_CONST,\
     186              :                         ATTR_NULL, ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
     187              : 
     188              : /* Allocation functions like malloc and realloc whose first argument
     189              :    with _SIZE_1, or second argument with _SIZE_2, specifies the size
     190              :    of the allocated object.  */
     191       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_SIZE_1_NOTHROW_LIST, ATTR_ALLOC_SIZE,   \
     192              :                     ATTR_LIST_1, ATTR_MALLOC_NOTHROW_LIST)
     193       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LIST, ATTR_WARN_UNUSED_RESULT,       \
     194              :                     ATTR_NULL, ATTR_MALLOC_NOTHROW_LIST)
     195       229921 : DEF_ATTR_TREE_LIST (ATTR_ALLOC_WARN_UNUSED_RESULT_SIZE_2_NOTHROW_LIST, ATTR_ALLOC_SIZE, \
     196              :                     ATTR_LIST_2, ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LIST)
     197       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_SIZE_1_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
     198              :                     ATTR_LIST_1, ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     199              : /* Alloca is just like malloc except that it never returns null.  */
     200       229921 : DEF_ATTR_TREE_LIST (ATTR_ALLOCA_WARN_UNUSED_RESULT_SIZE_1_NOTHROW_LEAF_LIST, ATTR_RETURNS_NONNULL,
     201              :                     ATTR_NULL, ATTR_MALLOC_WARN_UNUSED_RESULT_SIZE_1_NOTHROW_LEAF_LIST)
     202              : 
     203              : /* Allocation functions like calloc the product of whose first two arguments
     204              :    specifies the size of the allocated object.  */
     205       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_SIZE_1_2_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
     206              :                     ATTR_LIST_1_2, ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     207              : 
     208              : /* Allocation functions like realloc whose second argument specifies
     209              :    the size of the allocated object.  */
     210       229921 : DEF_ATTR_TREE_LIST (ATTR_ALLOC_WARN_UNUSED_RESULT_SIZE_2_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
     211              :                     ATTR_LIST_2, ATTR_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     212              : 
     213              : /* Functions whose pointer parameter(s) are all nonnull.  */
     214       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_LIST, ATTR_NONNULL, ATTR_NULL, ATTR_NULL)
     215              : /* Functions whose first parameter is a nonnull pointer.  */
     216       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL)
     217              : /* Functions whose second parameter is a nonnull pointer.  */
     218       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, ATTR_NULL)
     219              : /* Functions whose third parameter is a nonnull pointer.  */
     220       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, ATTR_NULL)
     221              : /* Functions whose selected pointer parameter(s) are conditionally
     222              :    nonnull.  */
     223       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_IF123_LIST, ATTR_NONNULL_IF_NONZERO, \
     224              :                         ATTR_LIST_1_2_3, ATTR_NULL)
     225       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_4_IF123_LIST, ATTR_NONNULL, \
     226              :                         ATTR_LIST_4, ATTR_NONNULL_IF123_LIST)
     227              : /* Nothrow functions with the sentinel(1) attribute. */
     228       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_SENTINEL_1, ATTR_SENTINEL, ATTR_LIST_1, \
     229              :                         ATTR_NOTHROW_LIST)
     230              : /* Nothrow functions whose pointer parameter(s) are all nonnull.  */
     231       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL, ATTR_NONNULL, ATTR_NULL, \
     232              :                         ATTR_NOTHROW_LIST)
     233              : /* Nothrow leaf functions whose pointer parameter(s) are all nonnull.  */
     234       229956 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_LEAF, ATTR_NONNULL, ATTR_NULL, \
     235              :                         ATTR_NOTHROW_LEAF_LIST)
     236       229936 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_NONNULL_LEAF)
     237              : /* Nothrow functions whose first parameter is a nonnull pointer.  */
     238       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \
     239              :                         ATTR_NOTHROW_LIST)
     240              : /* Nothrow functions whose second parameter is a nonnull pointer.  */
     241       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, \
     242              :                         ATTR_NOTHROW_LIST)
     243              : /* Nothrow functions whose third parameter is a nonnull pointer.  */
     244       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, \
     245              :                         ATTR_NOTHROW_LIST)
     246              : /* Nothrow functions whose fourth parameter is a nonnull pointer.  */
     247       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_4, ATTR_NONNULL, ATTR_LIST_4, \
     248              :                         ATTR_NOTHROW_LIST)
     249              : /* Nothrow functions whose fifth parameter is a nonnull pointer.  */
     250       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_5, ATTR_NONNULL, ATTR_LIST_5, \
     251              :                         ATTR_NOTHROW_LIST)
     252              : /* Nothrow leaf functions whose selected pointer parameter(s) are conditionally
     253              :    nonnull.  */
     254       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_IF12_LEAF, ATTR_NONNULL_IF_NONZERO, \
     255              :                         ATTR_LIST_1_2, ATTR_NOTHROW_LEAF_LIST)
     256       229946 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_IF13_LEAF, ATTR_NONNULL_IF_NONZERO, \
     257              :                         ATTR_LIST_1_3, ATTR_NOTHROW_LEAF_LIST)
     258       229946 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_IF123_LEAF, ATTR_NONNULL_IF_NONZERO, \
     259              :                         ATTR_LIST_2_3, ATTR_NOTHROW_NONNULL_IF13_LEAF)
     260       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_IF23_LEAF, ATTR_NONNULL_IF_NONZERO, \
     261              :                         ATTR_LIST_2_3, ATTR_NOTHROW_LEAF_LIST)
     262       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_IF23_LEAF, ATTR_NONNULL, \
     263              :                         ATTR_LIST_1, ATTR_NOTHROW_NONNULL_IF23_LEAF)
     264              : 
     265              : /* Same as ATTR_NONNULL_1.  */
     266       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL)
     267              : /* Functions like {v,}fprintf whose first and second parameters are
     268              :    nonnull pointers.  As cancellation points the functions are not
     269              :    nothrow.  */
     270       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_1_2, ATTR_NULL)
     271              : /* The following don't have {v,}fprintf forms.  They exist only to
     272              :    make it possible to declare {v,}{f,s}printf attributes using
     273              :    the same macro.  */
     274       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_3, ATTR_NONNULL, ATTR_LIST_1_3, ATTR_NULL)
     275       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_1_4, ATTR_NULL)
     276       229921 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_5, ATTR_NONNULL, ATTR_LIST_1_5, ATTR_NULL)
     277              : 
     278              : /* Same as ATTR_NOTHROW_NONNULL_1.  */
     279       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_1, ATTR_NONNULL, ATTR_LIST_1,
     280              :                     ATTR_NOTHROW_LIST)
     281              : /* Nothrow functions like {v,}sprintf whose first and second parameters
     282              :    are nonnull pointers.  */
     283       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_1_2, \
     284              :                     ATTR_NOTHROW_LIST)
     285              : /* Nothrow functions like {v,}snprintf whose first and third parameters
     286              :    are nonnull pointers.  */
     287       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_3, ATTR_NONNULL, ATTR_LIST_1_3, \
     288              :                     ATTR_NOTHROW_LIST)
     289              : /* Nothrow functions like {v,}sprintf_chk whose first and fourth parameters
     290              :    are nonnull pointers.  */
     291       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_1_4, \
     292              :                     ATTR_NOTHROW_LIST)
     293              : /* Nothrow functions like {v,}snprintf_chk whose first and fifth parameters
     294              :    are nonnull pointers.  */
     295       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_5, ATTR_NONNULL, ATTR_LIST_1_5, \
     296              :                     ATTR_NOTHROW_LIST)
     297              : 
     298              : /* Nothrow leaf functions which are type-generic.  */
     299       229921 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
     300              :                         ATTR_NOTHROW_LEAF_LIST)
     301              : /* Nothrow nonnull leaf functions that are type-generic.  */
     302       229936 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_TYPEGENERIC_LEAF,
     303              :                     ATTR_TYPEGENERIC, ATTR_NULL,
     304              :                     ATTR_NOTHROW_NONNULL_LEAF)
     305              : /* Nothrow const functions whose pointer parameter(s) are all nonnull.  */
     306       229921 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL, ATTR_CONST, ATTR_NULL, \
     307              :                         ATTR_NOTHROW_NONNULL)
     308              : /* Nothrow leaf functions whose pointer parameter(s) are all nonnull,
     309              :    and which return their first argument.  */
     310       229921 : DEF_ATTR_TREE_LIST (ATTR_RET1_NOTHROW_NONNULL_LEAF, ATTR_FNSPEC, ATTR_LIST_STR1, \
     311              :                         ATTR_NOTHROW_NONNULL_LEAF)
     312              : /* Nothrow leaf functions whose pointer parameter(s) are all nonnull,
     313              :    and return value is also nonnull.  */
     314       229921 : DEF_ATTR_TREE_LIST (ATTR_RETNONNULL_NOTHROW_LEAF, ATTR_RETURNS_NONNULL, ATTR_NULL, \
     315              :                         ATTR_NOTHROW_NONNULL_LEAF)
     316              : /* Nothrow const leaf functions whose pointer parameter(s) are all nonnull.  */
     317       229921 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL_LEAF, ATTR_CONST, ATTR_NULL, \
     318              :                         ATTR_NOTHROW_NONNULL_LEAF)
     319              : /* Nothrow const functions which are type-generic.  */
     320       229921 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC, ATTR_TYPEGENERIC, ATTR_NULL, \
     321              :                         ATTR_CONST_NOTHROW_LIST)
     322              : /* Nothrow const leaf functions which are type-generic.  */
     323       229921 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
     324              :                         ATTR_CONST_NOTHROW_LEAF_LIST)
     325              : /* Nothrow pure functions whose pointer parameter(s) are all nonnull.  */
     326       229921 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL, ATTR_PURE, ATTR_NULL, \
     327              :                         ATTR_NOTHROW_NONNULL)
     328              : /* Nothrow pure leaf functions whose pointer parameter(s) are all nonnull.  */
     329       229936 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_LEAF, ATTR_PURE, ATTR_NULL, \
     330              :                         ATTR_NOTHROW_NONNULL_LEAF)
     331              : /* Nothrow pure leaf functions whose selected pointer parameter(s) are
     332              :    conditionally nonnull. */
     333       229921 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_IF12_LEAF, ATTR_PURE, ATTR_NULL, \
     334              :                         ATTR_NOTHROW_NONNULL_IF12_LEAF)
     335       229921 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_IF13_LEAF, ATTR_PURE, ATTR_NULL, \
     336              :                         ATTR_NOTHROW_NONNULL_IF13_LEAF)
     337       229921 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_IF123_LEAF, ATTR_PURE, ATTR_NULL, \
     338              :                         ATTR_NOTHROW_NONNULL_IF123_LEAF)
     339              : /* Nothrow malloc functions whose pointer parameter(s) are all nonnull.  */
     340       229921 : DEF_ATTR_TREE_LIST (ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL, ATTR_WARN_UNUSED_RESULT, ATTR_NULL, \
     341              :                         ATTR_NOTHROW_NONNULL)
     342       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_NONNULL, ATTR_MALLOC, ATTR_NULL, \
     343              :                         ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL)
     344              : /* Nothrow malloc leaf functions whose pointer parameter(s) are all nonnull.  */
     345       229921 : DEF_ATTR_TREE_LIST (ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL_LEAF, ATTR_WARN_UNUSED_RESULT, ATTR_NULL, \
     346              :                         ATTR_NOTHROW_NONNULL_LEAF)
     347       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_NONNULL_LEAF, ATTR_MALLOC, ATTR_NULL, \
     348              :                         ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL_LEAF)
     349              : /* Nothrow malloc leaf functions whose selected pointer parameter(s) are
     350              :    conditionally nonnull.  */
     351       229921 : DEF_ATTR_TREE_LIST (ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL_IF12_LEAF, \
     352              :                         ATTR_WARN_UNUSED_RESULT, ATTR_NULL, \
     353              :                         ATTR_NOTHROW_NONNULL_IF12_LEAF)
     354       229921 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_NONNULL_IF12_LEAF, \
     355              :                         ATTR_MALLOC, ATTR_NULL, \
     356              :                         ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL_IF12_LEAF)
     357              : 
     358              : /* Construct a tree for the format attribute (and implicitly nonnull).  */
     359              : #define DEF_FORMAT_ATTRIBUTE(TYPE, FA, VALUES)                           \
     360              :   DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL,                 \
     361              :                       ATTR_##TYPE, ATTR_LIST_##VALUES)                   \
     362              :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_##VALUES, ATTR_FORMAT,        \
     363              :                       ATTR_##TYPE##_##VALUES, ATTR_NONNULL_##FA)
     364              : 
     365              : /* Construct a tree for the format and nothrow attributes (format
     366              :    implies nonnull).  */
     367              : #define DEF_FORMAT_ATTRIBUTE_NOTHROW(TYPE, FA, VALUES)                   \
     368              :   DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL,                 \
     369              :                       ATTR_##TYPE, ATTR_LIST_##VALUES)                   \
     370              :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_NOTHROW_##VALUES, ATTR_FORMAT,\
     371              :                       ATTR_##TYPE##_##VALUES, ATTR_NOTHROW_NONNULL_##FA)
     372              : 
     373              : /* Construct one tree for the format attribute and another for the format
     374              :    and nothrow attributes (in both cases format implies nonnull).  */
     375              : #define DEF_FORMAT_ATTRIBUTE_BOTH(TYPE, FA, VALUES)                      \
     376              :   DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL,                 \
     377              :                       ATTR_##TYPE, ATTR_LIST_##VALUES)                   \
     378              :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_##VALUES, ATTR_FORMAT,        \
     379              :                       ATTR_##TYPE##_##VALUES, ATTR_NONNULL_##FA)         \
     380              :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_NOTHROW_##VALUES, ATTR_FORMAT,\
     381              :                       ATTR_##TYPE##_##VALUES, ATTR_NOTHROW_NONNULL_##FA)
     382              : 
     383              : /* Construct a pair of trees for the nonnull attribute for the first
     384              :    argument, plus format printf attribute (format implies nonnull):
     385              :    the first ordinary and the second nothrow.  */
     386              : #define DEF_FORMAT_ATTRIBUTE_NONNULL(TYPE, FA, VALUES)                   \
     387              :   DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_FORMAT_##TYPE##_##VALUES,           \
     388              :                       ATTR_FORMAT, ATTR_##TYPE##_##VALUES,               \
     389              :                       ATTR_NONNULL_1_##FA)                               \
     390              :   DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_FORMAT_##TYPE##_##VALUES,   \
     391              :                       ATTR_FORMAT, ATTR_##TYPE##_##VALUES,               \
     392              :                       ATTR_NOTHROW_NONNULL_1_##FA)
     393              : 
     394       229921 : DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_0)
     395       229921 : DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_2)
     396       229921 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,2,2_0)
     397       229921 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,2,2_3)
     398       229921 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,3,3_0)
     399       229921 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,3,3_4)
     400       229921 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,4,4_0)
     401       229921 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,4,4_5)
     402       229921 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,5,5_0)
     403       229921 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,5,5_6)
     404              : 
     405              : /* Attributes for fprintf(f, f, va).  */
     406       229921 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,1,1_2)
     407              : /* Attributes for v{f,s}printf(d, f, va).  vsprintf is nothrow, vfprintf
     408              :    is not.  */
     409       229921 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,2,2_0)
     410              : /* Attributes for {f,s}printf(d, f, ...).  sprintf is nothrow, fprintf
     411              :    is not.  */
     412       229921 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,2,2_3)
     413              : /* Attributes for vprintf_chk.  */
     414       229921 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,3,3_0)
     415              : /* Attributes for printf_chk.  */
     416       229921 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,3,3_4)
     417              : /* Attributes for v{f,s}printf_chk(d, t, bos, f, va).  vsprintf_chk is
     418              :    nothrow, vfprintf_chk is not.  */
     419       229921 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,4,4_0)
     420              : /* Attributes for {f,s}printf_chk(d, t, bos, f, ...).  sprintf_chk is
     421              :    nothrow, fprintf_chk is not.  */
     422       229921 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,4,4_5)
     423              : 
     424       229921 : DEF_FORMAT_ATTRIBUTE(SCANF,1,1_0)
     425       229921 : DEF_FORMAT_ATTRIBUTE(SCANF,1,1_2)
     426       229921 : DEF_FORMAT_ATTRIBUTE_BOTH(SCANF,2,2_0)
     427       229921 : DEF_FORMAT_ATTRIBUTE_BOTH(SCANF,2,2_3)
     428       229921 : DEF_FORMAT_ATTRIBUTE_NOTHROW(STRFTIME,3,3_0)
     429       229921 : DEF_FORMAT_ATTRIBUTE_NOTHROW(STRFMON,3,3_4)
     430              : #undef DEF_FORMAT_ATTRIBUTE
     431              : #undef DEF_FORMAT_ATTRIBUTE_NOTHROW
     432              : #undef DEF_FORMAT_ATTRIBUTE_BOTH
     433              : 
     434              : /* Construct callback attributes for GOMP builtins.  */
     435              : #define DEF_CALLBACK_ATTRIBUTE(TYPE, CA, VALUES)                         \
     436              :   DEF_ATTR_TREE_LIST (ATTR_CALLBACK_##TYPE##_##CA##_##VALUES, ATTR_CALLBACK,\
     437              :                       ATTR_##CA, ATTR_LIST_##VALUES)
     438              : 
     439       229921 : DEF_CALLBACK_ATTRIBUTE(GOMP, 1, 2)
     440       229921 : DEF_ATTR_TREE_LIST(ATTR_CALLBACK_GOMP_LIST, ATTR_CALLBACK,
     441              :                    ATTR_CALLBACK_GOMP_1_2, ATTR_NOTHROW_LIST)
     442              : #undef DEF_CALLBACK_ATTRIBUTE
     443              : 
     444              : /* Transactional memory variants of the above.  */
     445              : 
     446       229921 : DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_LIST,
     447              :                     ATTR_TM_REGPARM, ATTR_NULL, ATTR_NOTHROW_LIST)
     448       229921 : DEF_ATTR_TREE_LIST (ATTR_TM_TMPURE_NOTHROW_LIST,
     449              :                     ATTR_TM_TMPURE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
     450       229921 : DEF_ATTR_TREE_LIST (ATTR_TM_PURE_TMPURE_NOTHROW_LIST,
     451              :                     ATTR_PURE, ATTR_NULL, ATTR_TM_TMPURE_NOTHROW_LIST)
     452       229921 : DEF_ATTR_TREE_LIST (ATTR_TM_NORETURN_NOTHROW_LIST,
     453              :                     ATTR_TM_REGPARM, ATTR_NULL, ATTR_NORETURN_NOTHROW_LIST)
     454       229921 : DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
     455              :                     ATTR_TM_REGPARM, ATTR_NULL, ATTR_CONST_NOTHROW_LIST)
     456       229921 : DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_LIST,
     457              :                     ATTR_RETURNS_TWICE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
     458              : 
     459              : /* Same attributes used for BUILT_IN_MALLOC except with TM_PURE thrown in.  */
     460       229921 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_MALLOC_NOTHROW_LIST,
     461              :                    ATTR_TM_TMPURE, ATTR_NULL, ATTR_MALLOC_NOTHROW_LIST)
     462              : /* Same attributes used for BUILT_IN_FREE except with TM_PURE thrown in.  */
     463       229921 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NOTHROW_LIST,
     464              :                    ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LIST)
     465              : 
     466       229921 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NOTHROW_LEAF_LIST,
     467              :                     ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     468       229921 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST,
     469              :                     ATTR_TM_TMPURE, ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     470       229921 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST,
     471              :                     ATTR_COLD, ATTR_NULL,
     472              :                     ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
     473              : 
     474              : /* Construct a tree for a format_arg attribute.  */
     475              : #define DEF_FORMAT_ARG_ATTRIBUTE(FA)                                    \
     476              :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_ARG_##FA, ATTR_FORMAT_ARG,            \
     477              :                       ATTR_LIST_##FA, ATTR_NOTHROW_NONNULL_##FA)
     478       229921 : DEF_FORMAT_ARG_ATTRIBUTE(1)
     479       229921 : DEF_FORMAT_ARG_ATTRIBUTE(2)
     480              : #undef DEF_FORMAT_ARG_ATTRIBUTE
     481              : 
        

Generated by: LCOV version 2.4-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.