summaryrefslogtreecommitdiffstats
path: root/spec/rtems/basedefs/req/const-0.yml
blob: 1d8af067be8469e3f6d2ca3df6391d2a5854f7ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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/const
rationale: null
references: []
requirement-type: functional
text: |
  When the code is compiled with the GNU C compiler,
  and the ${../if/const:/name} macro is attached to a
  function declaration or definition,
  and the return value of that function is not affected by changes
  to the observable state of the program and that function has
  no observable effects on such state other than to return a value,
  the ${../if/const:/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.
type: requirement