source: rtems-central/spec/if/rtems/basedefs/dequalify-depthx.yml @ 31a305f

Last change on this file since 31a305f was 31a305f, checked in by Sebastian Huber <sebastian.huber@…>, on 05/06/20 at 10:44:23

spec: Add some interface items

  • Property mode set to 100644
File size: 1.6 KB
Line 
1SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
2copyrights:
3- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
4- Copyright (C) 2014 Paval Pisa
5enabled-by: []
6interface-brief: |
7  Performs a type cast which removes qualifiers without warnings to the
8  specified type for the specified variable.
9interface-definition:
10  default:
11    ((_type)(${/if/c/uintptr_t:/interface-name})(const volatile void *)(_var))
12  variants:
13  - definition: |
14     (const_cast<_type>(_var))
15    enabled-by:
16    - defined(${/if/compiler/cplusplus:/interface-name})
17  - definition: |
18      ${/if/compiler/builtin-choose-expr:/interface-name}(${/if/compiler/builtin-types-compatible-p:/interface-name}(
19          ${typeof-refx:/interface-name}(_ptr_level, _var),
20          ${typeof-refx:/interface-name}(_ptr_level, _type)
21        ) || ${/if/compiler/builtin-types-compatible-p:/interface-name}(_type, void *),
22      (_type)(_var),
23      ${/if/impl/dequalify-types-not-compatible:/interface-name}())
24    enabled-by:
25    - defined(${/if/compiler/gnuc:/interface-name})
26interface-description: null
27interface-name: RTEMS_DEQUALIFY_DEPTHX
28interface-params:
29- description: |
30    is the pointer indirection level expressed in *.
31  dir: null
32  name: _ptr_level
33- description: |
34    is the target type of the cast.
35  dir: null
36  name: _type
37- description: |
38    is the variable.
39  dir: null
40  name: _var
41interface-return:
42  return: null
43  return-values: []
44interface-type: macro
45links:
46- role: interface-placement
47  uid: header
48- role: interface-ingroup
49  uid: /groups/api/basedefs
50type: interface
Note: See TracBrowser for help on using the repository browser.