summaryrefslogtreecommitdiffstats
path: root/spec/rtems/basedefs/req/alloc-size-2-0.yml
blob: 6e2e26e35818621883a38d9ac7d66bf3be722ec9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
SPDX-License-Identifier: CC-BY-SA-4.0
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
enabled-by: true
links:
- role: requirement-refinement
  uid: ../if/alloc-size-2
non-functional-type: interface
rationale: null
references: []
requirement-type: non-functional
text: |
  When the code is compiled with the GNU C compiler,
  and the ${../if/alloc-size-2:/name} macro is used as last part of a
  function declaration,
  and ${../if/alloc-size-2:/params[0]/name} as well as
  ${../if/alloc-size-2:/params[1]/name} are constant numbers
  referring to two different arguments of that function
  (counting of arguments starts at 1 from the left),
  and the declared function returns a pointer to memory with the size in bytes
  provided by the multiplication of the function arguments
  number ${../if/alloc-size-2:/params[0]/name} and
  ${../if/alloc-size-2:/params[1]/name},
  the macro shall cause the compiler to improve the correctness of
  ``__builtin_object_sizepointer`` analysis.
type: requirement