summaryrefslogblamecommitdiffstats
path: root/spec/rtems/basedefs/req/return-address-0.yml
blob: 0bcbab2fa0f767dcb514d6d22fbbc6f20532ef13 (plain) (tree)
1
2
3
4
5
6
7
8

                                     
                                                  
                
                         
      
                          
                           














                                                                        
                            




                                                               
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/return-address
rationale: |
  From the GNU C compiler documentation:

  * When inlining the expected behavior is that the function returns
    the address of the function that is returned to.
  * When the top of the stack has been reached, this function returns
    an unspecified value.
  * Additional post-processing of the returned value may be needed, see
    ``__builtin_extract_return_addr``.
  * The stored representation of the return address in memory may be
    different from the address returned by ``__builtin_return_address``.

  Under these circumstances it is at least difficult to specify
  what the actual result of this macro is.
references: []
requirement-type: functional
text: |
  When the code is compiled with the GNU C compiler,
  the ${../if/return-address:/name} macro shall evaluate to the
  code ``__builtin_return_address( 0 )``.
type: requirement