summaryrefslogtreecommitdiffstats
path: root/spec/rtems/basedefs/if/dequalify-depthx.yml
blob: a582242f1eb6044d2782315c34dc1d2ab27f5e89 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
brief: |
  Performs a type cast which removes qualifiers without warnings to the
  type for the variable.
copyrights:
- Copyright (C) 2020 embedded brains GmbH & Co. KG
- Copyright (C) 2014 Paval Pisa
definition:
  default:
    attributes: null
    body: |
      ( (${.:/params[1]/name}) (${/c/if/uintptr_t:/name}) (const volatile void *)( ${.:/params[2]/name} ) )
    params: []
    return: null
  variants:
  - definition:
      attributes: null
      body: |
        ( const_cast<${.:/params[1]/name}>( ${.:/params[2]/name} ) )
      params: []
      return: null
    enabled-by:
    - defined(${/compiler/if/cplusplus:/name})
  - definition:
      attributes: null
      body: |
        ${/compiler/if/builtin-choose-expr:/name}(
          ${/compiler/if/builtin-types-compatible-p:/name}(
            ${typeof-refx:/name}( ${.:/params[0]/name}, ${.:/params[2]/name} ),
            ${typeof-refx:/name}( ${.:/params[0]/name}, ${.:/params[1]/name} )
          ) ||
          ${/compiler/if/builtin-types-compatible-p:/name}(
            ${.:/params[1]/name},
            void *
          ),
          (${.:/params[1]/name}) ( ${.:/params[2]/name} ),
          ${/score/basedefs/if/dequalify-types-not-compatible:/name}()
        )
      params: []
      return: null
    enabled-by:
    - defined(${/compiler/if/gnuc:/name})
description: null
enabled-by: true
index-entries: []
interface-type: macro
links:
- role: interface-placement
  uid: header
- role: interface-ingroup
  uid: group
name: RTEMS_DEQUALIFY_DEPTHX
notes: null
params:
- description: |
    is the pointer indirection level expressed in ``*``.
  dir: null
  name: _ptr_level
- description: |
    is the target type of the cast.
  dir: null
  name: _type
- description: |
    is the variable.
  dir: null
  name: _var
return: null
type: interface