LCOV - code coverage report
Current view: top level - gcc - builtin-attrs.def (source / functions) Hit Total Coverage
Test: gcc.info Lines: 154 154 100.0 %
Date: 2020-05-30 12:51:24 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* Copyright (C) 2001-2020 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                 :     171549 : 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                 :     171549 : DEF_ATTR_FOR_INT (0)
      56                 :     171549 : DEF_ATTR_FOR_INT (1)
      57                 :     171549 : DEF_ATTR_FOR_INT (2)
      58                 :     171549 : DEF_ATTR_FOR_INT (3)
      59                 :     171549 : DEF_ATTR_FOR_INT (4)
      60                 :     171549 : DEF_ATTR_FOR_INT (5)
      61                 :     171549 : 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                 :     171599 : DEF_ATTR_FOR_STRING (STR1, "1")
      70                 :            : #undef DEF_ATTR_FOR_STRING
      71                 :            : 
      72                 :            : /* Construct a tree for a list of two integers.  */
      73                 :            : #define DEF_LIST_INT_INT(VALUE1, VALUE2)                                 \
      74                 :            :   DEF_ATTR_TREE_LIST (ATTR_LIST_##VALUE1##_##VALUE2, ATTR_NULL,          \
      75                 :            :                       ATTR_##VALUE1, ATTR_LIST_##VALUE2)
      76                 :     171549 : DEF_LIST_INT_INT (1,0)
      77                 :     171549 : DEF_LIST_INT_INT (1,2)
      78                 :     171549 : DEF_LIST_INT_INT (1,3)
      79                 :     171549 : DEF_LIST_INT_INT (1,4)
      80                 :     171549 : DEF_LIST_INT_INT (1,5)
      81                 :     171549 : DEF_LIST_INT_INT (2,0)
      82                 :     171549 : DEF_LIST_INT_INT (2,3)
      83                 :     171549 : DEF_LIST_INT_INT (3,0)
      84                 :     171549 : DEF_LIST_INT_INT (3,4)
      85                 :     171549 : DEF_LIST_INT_INT (4,0)
      86                 :     171549 : DEF_LIST_INT_INT (4,5)
      87                 :     171549 : DEF_LIST_INT_INT (5,0)
      88                 :     171549 : DEF_LIST_INT_INT (5,6)
      89                 :            : #undef DEF_LIST_INT_INT
      90                 :            : 
      91                 :            : /* Construct trees for identifiers used in built-in function attributes.
      92                 :            :    The construction contributes to startup costs so only attributes that
      93                 :            :    are used to define built-ins should be defined here.  */
      94                 :     171549 : DEF_ATTR_IDENT (ATTR_ALLOC_SIZE, "alloc_size")
      95                 :     171549 : DEF_ATTR_IDENT (ATTR_COLD, "cold")
      96                 :     171564 : DEF_ATTR_IDENT (ATTR_CONST, "const")
      97                 :     171549 : DEF_ATTR_IDENT (ATTR_FORMAT, "format")
      98                 :     171549 : DEF_ATTR_IDENT (ATTR_FORMAT_ARG, "format_arg")
      99                 :     171549 : DEF_ATTR_IDENT (ATTR_MALLOC, "malloc")
     100                 :     171594 : DEF_ATTR_IDENT (ATTR_NONNULL, "nonnull")
     101                 :     171549 : DEF_ATTR_IDENT (ATTR_NORETURN, "noreturn")
     102                 :     171594 : DEF_ATTR_IDENT (ATTR_NOTHROW, "nothrow")
     103                 :     171594 : DEF_ATTR_IDENT (ATTR_LEAF, "leaf")
     104                 :     171574 : DEF_ATTR_IDENT (ATTR_FNSPEC, "fn spec")
     105                 :     171549 : DEF_ATTR_IDENT (ATTR_PRINTF, "printf")
     106                 :     171549 : DEF_ATTR_IDENT (ATTR_ASM_FPRINTF, "asm_fprintf")
     107                 :     171549 : DEF_ATTR_IDENT (ATTR_GCC_DIAG, "gcc_diag")
     108                 :     171549 : DEF_ATTR_IDENT (ATTR_GCC_CDIAG, "gcc_cdiag")
     109                 :     171549 : DEF_ATTR_IDENT (ATTR_GCC_CXXDIAG, "gcc_cxxdiag")
     110                 :     171564 : DEF_ATTR_IDENT (ATTR_PURE, "pure")
     111                 :     171549 : DEF_ATTR_IDENT (ATTR_NOVOPS, "no vops")
     112                 :     171549 : DEF_ATTR_IDENT (ATTR_SCANF, "scanf")
     113                 :     171549 : DEF_ATTR_IDENT (ATTR_SENTINEL, "sentinel")
     114                 :     171549 : DEF_ATTR_IDENT (ATTR_STRFMON, "strfmon")
     115                 :     171549 : DEF_ATTR_IDENT (ATTR_STRFTIME, "strftime")
     116                 :     171564 : DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
     117                 :     171549 : DEF_ATTR_IDENT (ATTR_TM_REGPARM, "*tm regparm")
     118                 :     171549 : DEF_ATTR_IDENT (ATTR_TM_TMPURE, "transaction_pure")
     119                 :     171549 : DEF_ATTR_IDENT (ATTR_RETURNS_TWICE, "returns_twice")
     120                 :     171549 : DEF_ATTR_IDENT (ATTR_RETURNS_NONNULL, "returns_nonnull")
     121                 :     171549 : DEF_ATTR_IDENT (ATTR_WARN_UNUSED_RESULT, "warn_unused_result")
     122                 :            : 
     123                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LIST, ATTR_NOVOPS, ATTR_NULL, ATTR_NULL)
     124                 :            : 
     125                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOVOPS_LIST)
     126                 :            : 
     127                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NULL)
     128                 :            : 
     129                 :     171594 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LIST, ATTR_NOTHROW, ATTR_NULL, ATTR_NULL)
     130                 :            : 
     131                 :     171594 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_LIST)
     132                 :            : 
     133                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOVOPS_NOTHROW_LEAF_LIST, ATTR_NOVOPS, \
     134                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     135                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LIST, ATTR_CONST,        \
     136                 :            :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     137                 :     171564 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_CONST,   \
     138                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     139                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LIST, ATTR_PURE,          \
     140                 :            :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     141                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LEAF_LIST, ATTR_PURE,     \
     142                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     143                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN,  \
     144                 :            :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     145                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_NORETURN,\
     146                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     147                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST, ATTR_COLD,\
     148                 :            :                         ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     149                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_RT_NOTHROW_LEAF_LIST, ATTR_RETURNS_TWICE,\
     150                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     151                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_COLD_NOTHROW_LEAF_LIST, ATTR_COLD,\
     152                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     153                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST, ATTR_COLD,\
     154                 :            :                         ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     155                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST, ATTR_CONST,\
     156                 :            :                         ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     157                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST, ATTR_COLD,\
     158                 :            :                         ATTR_NULL, ATTR_CONST_NORETURN_NOTHROW_LEAF_LIST)
     159                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC,      \
     160                 :            :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     161                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST, ATTR_WARN_UNUSED_RESULT, \
     162                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     163                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST, ATTR_MALLOC,      \
     164                 :            :                         ATTR_NULL, ATTR_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     165                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LIST, ATTR_SENTINEL,  \
     166                 :            :                         ATTR_NULL, ATTR_NOTHROW_LIST)
     167                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LEAF_LIST, ATTR_SENTINEL,     \
     168                 :            :                         ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     169                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST, ATTR_CONST,\
     170                 :            :                         ATTR_NULL, ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
     171                 :            : 
     172                 :            : /* Allocation functions like malloc and realloc whose first argument
     173                 :            :    with _SIZE_1, or second argument with _SIZE_2, specifies the size
     174                 :            :    of the allocated object.  */
     175                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_SIZE_1_NOTHROW_LIST, ATTR_ALLOC_SIZE,   \
     176                 :            :                     ATTR_LIST_1, ATTR_MALLOC_NOTHROW_LIST)
     177                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LIST, ATTR_WARN_UNUSED_RESULT,       \
     178                 :            :                     ATTR_NULL, ATTR_MALLOC_NOTHROW_LIST)
     179                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_ALLOC_WARN_UNUSED_RESULT_SIZE_2_NOTHROW_LIST, ATTR_ALLOC_SIZE, \
     180                 :            :                     ATTR_LIST_2, ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LIST)
     181                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_SIZE_1_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
     182                 :            :                     ATTR_LIST_1, ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     183                 :            : /* Alloca is just like malloc except that it never returns null.  */
     184                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_ALLOCA_WARN_UNUSED_RESULT_SIZE_1_NOTHROW_LEAF_LIST, ATTR_RETURNS_NONNULL,
     185                 :            :                     ATTR_NULL, ATTR_MALLOC_WARN_UNUSED_RESULT_SIZE_1_NOTHROW_LEAF_LIST)
     186                 :            : 
     187                 :            : /* Allocation functions like calloc the product of whose first two arguments
     188                 :            :    specifies the size of the allocated object.  */
     189                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_SIZE_1_2_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
     190                 :            :                     ATTR_LIST_1_2, ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     191                 :            : 
     192                 :            : /* Allocation functions like realloc whose second argument specifies
     193                 :            :    the size of the allocated object.  */
     194                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_ALLOC_WARN_UNUSED_RESULT_SIZE_2_NOTHROW_LEAF_LIST, ATTR_ALLOC_SIZE, \
     195                 :            :                     ATTR_LIST_2, ATTR_WARN_UNUSED_RESULT_NOTHROW_LEAF_LIST)
     196                 :            : 
     197                 :            : /* Functions whose pointer parameter(s) are all nonnull.  */
     198                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_LIST, ATTR_NONNULL, ATTR_NULL, ATTR_NULL)
     199                 :            : /* Functions whose first parameter is a nonnull pointer.  */
     200                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL)
     201                 :            : /* Functions whose second parameter is a nonnull pointer.  */
     202                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, ATTR_NULL)
     203                 :            : /* Functions whose third parameter is a nonnull pointer.  */
     204                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, ATTR_NULL)
     205                 :            : /* Nothrow functions with the sentinel(1) attribute. */
     206                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_SENTINEL_1, ATTR_SENTINEL, ATTR_LIST_1, \
     207                 :            :                         ATTR_NOTHROW_LIST)
     208                 :            : /* Nothrow functions whose pointer parameter(s) are all nonnull.  */
     209                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL, ATTR_NONNULL, ATTR_NULL, \
     210                 :            :                         ATTR_NOTHROW_LIST)
     211                 :            : /* Nothrow leaf functions whose pointer parameter(s) are all nonnull.  */
     212                 :     171594 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_LEAF, ATTR_NONNULL, ATTR_NULL, \
     213                 :            :                         ATTR_NOTHROW_LEAF_LIST)
     214                 :     171564 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_NONNULL_LEAF)
     215                 :            : /* Nothrow functions whose first parameter is a nonnull pointer.  */
     216                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \
     217                 :            :                         ATTR_NOTHROW_LIST)
     218                 :            : /* Nothrow functions whose second parameter is a nonnull pointer.  */
     219                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, \
     220                 :            :                         ATTR_NOTHROW_LIST)
     221                 :            : /* Nothrow functions whose third parameter is a nonnull pointer.  */
     222                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, \
     223                 :            :                         ATTR_NOTHROW_LIST)
     224                 :            : /* Nothrow functions whose fourth parameter is a nonnull pointer.  */
     225                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_4, ATTR_NONNULL, ATTR_LIST_4, \
     226                 :            :                         ATTR_NOTHROW_LIST)
     227                 :            : /* Nothrow functions whose fifth parameter is a nonnull pointer.  */
     228                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_5, ATTR_NONNULL, ATTR_LIST_5, \
     229                 :            :                         ATTR_NOTHROW_LIST)
     230                 :            : 
     231                 :            : /* Same as ATTR_NONNULL_1.  */
     232                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL)
     233                 :            : /* Functions like {v,}fprintf whose first and second parameters are
     234                 :            :    nonnull pointers.  As cancellation points the functions are not
     235                 :            :    nothrow.  */
     236                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_1_2, ATTR_NULL)
     237                 :            : /* The following don't have {v,}fprintf forms.  They exist only to
     238                 :            :    make it possible to declare {v,}{f,s}printf attributes using
     239                 :            :    the same macro.  */
     240                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_3, ATTR_NONNULL, ATTR_LIST_1_3, ATTR_NULL)
     241                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_1_4, ATTR_NULL)
     242                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_5, ATTR_NONNULL, ATTR_LIST_1_5, ATTR_NULL)
     243                 :            : 
     244                 :            : /* Same as ATTR_NOTHROW_NONNULL_1.  */
     245                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_1, ATTR_NONNULL, ATTR_LIST_1,
     246                 :            :                     ATTR_NOTHROW_LIST)
     247                 :            : /* Nothrow functions like {v,}sprintf whose first and second parameters
     248                 :            :    are nonnull pointers.  */
     249                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_2, ATTR_NONNULL, ATTR_LIST_1_2, \
     250                 :            :                     ATTR_NOTHROW_LIST)
     251                 :            : /* Nothrow functions like {v,}snprintf whose first and third parameters
     252                 :            :    are nonnull pointers.  */
     253                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_3, ATTR_NONNULL, ATTR_LIST_1_3, \
     254                 :            :                     ATTR_NOTHROW_LIST)
     255                 :            : /* Nothrow functions like {v,}sprintf_chk whose first and fourth parameters
     256                 :            :    are nonnull pointers.  */
     257                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_4, ATTR_NONNULL, ATTR_LIST_1_4, \
     258                 :            :                     ATTR_NOTHROW_LIST)
     259                 :            : /* Nothrow functions like {v,}snprintf_chk whose first and fifth parameters
     260                 :            :    are nonnull pointers.  */
     261                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_5, ATTR_NONNULL, ATTR_LIST_1_5, \
     262                 :            :                     ATTR_NOTHROW_LIST)
     263                 :            :                 
     264                 :            : /* Nothrow leaf functions which are type-generic.  */
     265                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
     266                 :            :                         ATTR_NOTHROW_LEAF_LIST)
     267                 :            : /* Nothrow nonnull leaf functions that are type-generic.  */
     268                 :     171564 : DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_TYPEGENERIC_LEAF,
     269                 :            :                     ATTR_TYPEGENERIC, ATTR_NULL,
     270                 :            :                     ATTR_NOTHROW_NONNULL_LEAF)
     271                 :            : /* Nothrow const functions whose pointer parameter(s) are all nonnull.  */
     272                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL, ATTR_CONST, ATTR_NULL, \
     273                 :            :                         ATTR_NOTHROW_NONNULL)
     274                 :            : /* Nothrow leaf functions whose pointer parameter(s) are all nonnull,
     275                 :            :    and which return their first argument.  */
     276                 :     171574 : DEF_ATTR_TREE_LIST (ATTR_RET1_NOTHROW_NONNULL_LEAF, ATTR_FNSPEC, ATTR_LIST_STR1, \
     277                 :            :                         ATTR_NOTHROW_NONNULL_LEAF)
     278                 :            : /* Nothrow leaf functions whose pointer parameter(s) are all nonnull,
     279                 :            :    and return value is also nonnull.  */
     280                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_RETNONNULL_NOTHROW_LEAF, ATTR_RETURNS_NONNULL, ATTR_NULL, \
     281                 :            :                         ATTR_NOTHROW_NONNULL_LEAF)
     282                 :            : /* Nothrow const leaf functions whose pointer parameter(s) are all nonnull.  */
     283                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL_LEAF, ATTR_CONST, ATTR_NULL, \
     284                 :            :                         ATTR_NOTHROW_NONNULL_LEAF)
     285                 :            : /* Nothrow const functions which are type-generic.  */
     286                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC, ATTR_TYPEGENERIC, ATTR_NULL, \
     287                 :            :                         ATTR_CONST_NOTHROW_LIST)
     288                 :            : /* Nothrow const leaf functions which are type-generic.  */
     289                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
     290                 :            :                         ATTR_CONST_NOTHROW_LEAF_LIST)
     291                 :            : /* Nothrow pure functions whose pointer parameter(s) are all nonnull.  */
     292                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL, ATTR_PURE, ATTR_NULL, \
     293                 :            :                         ATTR_NOTHROW_NONNULL)
     294                 :            : /* Nothrow pure leaf functions whose pointer parameter(s) are all nonnull.  */
     295                 :     171564 : DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_LEAF, ATTR_PURE, ATTR_NULL, \
     296                 :            :                         ATTR_NOTHROW_NONNULL_LEAF)
     297                 :            : /* Nothrow malloc functions whose pointer parameter(s) are all nonnull.  */
     298                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL, ATTR_WARN_UNUSED_RESULT, ATTR_NULL, \
     299                 :            :                         ATTR_NOTHROW_NONNULL)
     300                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_NONNULL, ATTR_MALLOC, ATTR_NULL, \
     301                 :            :                         ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL)
     302                 :            : /* Nothrow malloc leaf functions whose pointer parameter(s) are all nonnull.  */
     303                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL_LEAF, ATTR_WARN_UNUSED_RESULT, ATTR_NULL, \
     304                 :            :                         ATTR_NOTHROW_NONNULL_LEAF)
     305                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_MALLOC_WARN_UNUSED_RESULT_NOTHROW_NONNULL_LEAF, ATTR_MALLOC, ATTR_NULL, \
     306                 :            :                         ATTR_WARN_UNUSED_RESULT_NOTHROW_NONNULL_LEAF)
     307                 :            : 
     308                 :            : /* Construct a tree for the format attribute (and implicitly nonnull).  */
     309                 :            : #define DEF_FORMAT_ATTRIBUTE(TYPE, FA, VALUES)                           \
     310                 :            :   DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL,                 \
     311                 :            :                       ATTR_##TYPE, ATTR_LIST_##VALUES)                   \
     312                 :            :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_##VALUES, ATTR_FORMAT,        \
     313                 :            :                       ATTR_##TYPE##_##VALUES, ATTR_NONNULL_##FA)
     314                 :            : 
     315                 :            : /* Construct a tree for the format and nothrow attributes (format
     316                 :            :    implies nonnull).  */
     317                 :            : #define DEF_FORMAT_ATTRIBUTE_NOTHROW(TYPE, FA, VALUES)                   \
     318                 :            :   DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL,                 \
     319                 :            :                       ATTR_##TYPE, ATTR_LIST_##VALUES)                   \
     320                 :            :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_NOTHROW_##VALUES, ATTR_FORMAT,\
     321                 :            :                       ATTR_##TYPE##_##VALUES, ATTR_NOTHROW_NONNULL_##FA)
     322                 :            : 
     323                 :            : /* Construct one tree for the format attribute and another for the format
     324                 :            :    and nothrow attributes (in both cases format implies nonnull).  */
     325                 :            : #define DEF_FORMAT_ATTRIBUTE_BOTH(TYPE, FA, VALUES)                      \
     326                 :            :   DEF_ATTR_TREE_LIST (ATTR_##TYPE##_##VALUES, ATTR_NULL,                 \
     327                 :            :                       ATTR_##TYPE, ATTR_LIST_##VALUES)                   \
     328                 :            :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_##VALUES, ATTR_FORMAT,        \
     329                 :            :                       ATTR_##TYPE##_##VALUES, ATTR_NONNULL_##FA)         \
     330                 :            :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_##TYPE##_NOTHROW_##VALUES, ATTR_FORMAT,\
     331                 :            :                       ATTR_##TYPE##_##VALUES, ATTR_NOTHROW_NONNULL_##FA)
     332                 :            : 
     333                 :            : /* Construct a pair of trees for the nonnull attribute for the first
     334                 :            :    argument, plus format printf attribute (format implies nonnull):
     335                 :            :    the first ordinary and the second nothrow.  */
     336                 :            : #define DEF_FORMAT_ATTRIBUTE_NONNULL(TYPE, FA, VALUES)                   \
     337                 :            :   DEF_ATTR_TREE_LIST (ATTR_NONNULL_1_FORMAT_##TYPE##_##VALUES,           \
     338                 :            :                       ATTR_FORMAT, ATTR_##TYPE##_##VALUES,               \
     339                 :            :                       ATTR_NONNULL_1_##FA)                               \
     340                 :            :   DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_FORMAT_##TYPE##_##VALUES,   \
     341                 :            :                       ATTR_FORMAT, ATTR_##TYPE##_##VALUES,               \
     342                 :            :                       ATTR_NOTHROW_NONNULL_1_##FA)
     343                 :            : 
     344                 :     171549 : DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_0)
     345                 :     171549 : DEF_FORMAT_ATTRIBUTE(PRINTF,1,1_2)
     346                 :     171549 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,2,2_0)
     347                 :     171549 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,2,2_3)
     348                 :     171549 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,3,3_0)
     349                 :     171549 : DEF_FORMAT_ATTRIBUTE_BOTH(PRINTF,3,3_4)
     350                 :     171549 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,4,4_0)
     351                 :     171549 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,4,4_5)
     352                 :     171549 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,5,5_0)
     353                 :     171549 : DEF_FORMAT_ATTRIBUTE_NOTHROW(PRINTF,5,5_6)
     354                 :            : 
     355                 :            : /* Attributes for fprintf(f, f, va).  */
     356                 :     171549 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,1,1_2)
     357                 :            : /* Attributes for v{f,s}printf(d, f, va).  vsprintf is nothrow, vfprintf
     358                 :            :    is not.  */
     359                 :     171549 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,2,2_0)
     360                 :            : /* Attributes for {f,s}printf(d, f, ...).  sprintf is nothrow, fprintf
     361                 :            :    is not.  */
     362                 :     171549 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,2,2_3)
     363                 :            : /* Attributes for vprintf_chk.  */
     364                 :     171549 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,3,3_0)
     365                 :            : /* Attributes for printf_chk.  */
     366                 :     171549 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,3,3_4)
     367                 :            : /* Attributes for v{f,s}printf_chk(d, t, bos, f, va).  vsprintf_chk is
     368                 :            :    nothrow, vfprintf_chk is not.  */
     369                 :     171549 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,4,4_0)
     370                 :            : /* Attributes for {f,s}printf_chk(d, t, bos, f, ...).  sprintf_chk is
     371                 :            :    nothrow, fprintf_chk is not.  */
     372                 :     171549 : DEF_FORMAT_ATTRIBUTE_NONNULL(PRINTF,4,4_5)
     373                 :            : 
     374                 :     171549 : DEF_FORMAT_ATTRIBUTE(SCANF,1,1_0)
     375                 :     171549 : DEF_FORMAT_ATTRIBUTE(SCANF,1,1_2)
     376                 :     171549 : DEF_FORMAT_ATTRIBUTE_BOTH(SCANF,2,2_0)
     377                 :     171549 : DEF_FORMAT_ATTRIBUTE_BOTH(SCANF,2,2_3)
     378                 :     171549 : DEF_FORMAT_ATTRIBUTE_NOTHROW(STRFTIME,3,3_0)
     379                 :     171549 : DEF_FORMAT_ATTRIBUTE_NOTHROW(STRFMON,3,3_4)
     380                 :            : #undef DEF_FORMAT_ATTRIBUTE
     381                 :            : #undef DEF_FORMAT_ATTRIBUTE_NOTHROW
     382                 :            : #undef DEF_FORMAT_ATTRIBUTE_BOTH
     383                 :            : 
     384                 :            : /* Transactional memory variants of the above.  */
     385                 :            : 
     386                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_LIST,
     387                 :            :                     ATTR_TM_REGPARM, ATTR_NULL, ATTR_NOTHROW_LIST)
     388                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TM_TMPURE_NOTHROW_LIST,
     389                 :            :                     ATTR_TM_TMPURE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
     390                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TM_PURE_TMPURE_NOTHROW_LIST,
     391                 :            :                     ATTR_PURE, ATTR_NULL, ATTR_TM_TMPURE_NOTHROW_LIST)
     392                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TM_NORETURN_NOTHROW_LIST,
     393                 :            :                     ATTR_TM_REGPARM, ATTR_NULL, ATTR_NORETURN_NOTHROW_LIST)
     394                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
     395                 :            :                     ATTR_TM_REGPARM, ATTR_NULL, ATTR_CONST_NOTHROW_LIST)
     396                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_LIST,
     397                 :            :                     ATTR_RETURNS_TWICE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
     398                 :            : 
     399                 :            : /* Same attributes used for BUILT_IN_MALLOC except with TM_PURE thrown in.  */
     400                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_MALLOC_NOTHROW_LIST,
     401                 :            :                    ATTR_TM_TMPURE, ATTR_NULL, ATTR_MALLOC_NOTHROW_LIST)
     402                 :            : /* Same attributes used for BUILT_IN_FREE except with TM_PURE thrown in.  */
     403                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NOTHROW_LIST,
     404                 :            :                    ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LIST)
     405                 :            : 
     406                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NOTHROW_LEAF_LIST,
     407                 :            :                     ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
     408                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST,
     409                 :            :                     ATTR_TM_TMPURE, ATTR_NULL, ATTR_NORETURN_NOTHROW_LEAF_LIST)
     410                 :     171549 : DEF_ATTR_TREE_LIST (ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST,
     411                 :            :                     ATTR_COLD, ATTR_NULL,
     412                 :            :                     ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
     413                 :            : 
     414                 :            : /* Construct a tree for a format_arg attribute.  */
     415                 :            : #define DEF_FORMAT_ARG_ATTRIBUTE(FA)                                    \
     416                 :            :   DEF_ATTR_TREE_LIST (ATTR_FORMAT_ARG_##FA, ATTR_FORMAT_ARG,            \
     417                 :            :                       ATTR_LIST_##FA, ATTR_NOTHROW_NONNULL_##FA)
     418                 :     171549 : DEF_FORMAT_ARG_ATTRIBUTE(1)
     419                 :     171549 : DEF_FORMAT_ARG_ATTRIBUTE(2)
     420                 :            : #undef DEF_FORMAT_ARG_ATTRIBUTE
     421                 :            : 

Generated by: LCOV version 1.0

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 --enable-host-shared. GCC test suite is run with the built compiler.