summaryrefslogtreecommitdiffstats
path: root/spec/rtems/basedefs/req/pure-0.yml
blob: 02c4365a571418114ad7c7388b5f9d29d6765735 (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
SPDX-License-Identifier: CC-BY-SA-4.0
copyrights:
- Copyright (C) 2020 embedded brains GmbH & Co. KG
enabled-by: true
functional-type: function
links:
- role: interface-function
  uid: ../if/pure
rationale: null
references: []
requirement-type: functional
text: |
  When the code is compiled with the GNU C compiler,
  and the ${../if/pure:/name} macro is attached to a
  function declaration or definition,
  and the function has no observable effects on the state of the program other
  than to return a value,
  the ${../if/pure:/name} macro shall permit the compiler to replace
  subsequent calls to the function with the same argument values by the result
  of the first call
  provided the state of the program observable by that function
  does not change in between two calls.
type: requirement