[rtems-central commit] spec: Fix format

Sebastian Huber sebh at rtems.org
Thu Nov 12 07:59:16 UTC 2020


Module:    rtems-central
Branch:    master
Commit:    d02b35c286b0ea44402c9b54db85775550476031
Changeset: http://git.rtems.org/rtems-central/commit/?id=d02b35c286b0ea44402c9b54db85775550476031

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov 12 08:42:23 2020 +0100

spec: Fix format

---

 spec/rtems/basedefs/if/alias.yml                 |  2 +-
 spec/rtems/basedefs/if/aligned.yml               |  2 +-
 spec/rtems/basedefs/if/alloc-align.yml           |  2 +-
 spec/rtems/basedefs/if/alloc-size-2.yml          |  2 +-
 spec/rtems/basedefs/if/alloc-size.yml            |  2 +-
 spec/rtems/basedefs/if/array-size.yml            |  2 +-
 spec/rtems/basedefs/if/concat.yml                |  2 +-
 spec/rtems/basedefs/if/const.yml                 |  2 +-
 spec/rtems/basedefs/if/container-of.yml          |  2 +-
 spec/rtems/basedefs/if/declare-global-symbol.yml |  2 +-
 spec/rtems/basedefs/if/deconst.yml               |  2 +-
 spec/rtems/basedefs/if/define-global-symbol.yml  |  6 +++---
 spec/rtems/basedefs/if/deprecated.yml            |  2 +-
 spec/rtems/basedefs/if/dequalify-depthx.yml      | 17 +++++++++--------
 spec/rtems/basedefs/if/dequalify.yml             |  2 +-
 spec/rtems/basedefs/if/devolatile.yml            |  2 +-
 spec/rtems/basedefs/if/expand.yml                |  2 +-
 spec/rtems/basedefs/if/have-member-same-type.yml |  4 ++--
 spec/rtems/basedefs/if/malloclike.yml            |  2 +-
 spec/rtems/basedefs/if/no-inline.yml             |  2 +-
 spec/rtems/basedefs/if/no-return.yml             |  2 +-
 spec/rtems/basedefs/if/obfuscate-variable.yml    |  4 ++--
 spec/rtems/basedefs/if/packed.yml                |  2 +-
 spec/rtems/basedefs/if/predict-false.yml         |  4 ++--
 spec/rtems/basedefs/if/predict-true.yml          |  4 ++--
 spec/rtems/basedefs/if/printflike.yml            |  2 +-
 spec/rtems/basedefs/if/pure.yml                  |  2 +-
 spec/rtems/basedefs/if/return-address.yml        |  2 +-
 spec/rtems/basedefs/if/section.yml               |  2 +-
 spec/rtems/basedefs/if/static-assert.yml         |  8 ++++----
 spec/rtems/basedefs/if/string.yml                |  2 +-
 spec/rtems/basedefs/if/symbol-name.yml           |  4 ++--
 spec/rtems/basedefs/if/typeof-refx.yml           |  2 +-
 spec/rtems/basedefs/if/unused.yml                |  2 +-
 spec/rtems/basedefs/if/used.yml                  |  2 +-
 spec/rtems/basedefs/if/warn-unused-result.yml    |  2 +-
 spec/rtems/basedefs/if/weak-alias.yml            |  2 +-
 spec/rtems/basedefs/if/weak.yml                  |  2 +-
 spec/rtems/basedefs/if/xconcat.yml               |  2 +-
 spec/rtems/basedefs/if/xstring.yml               |  2 +-
 40 files changed, 58 insertions(+), 57 deletions(-)

diff --git a/spec/rtems/basedefs/if/alias.yml b/spec/rtems/basedefs/if/alias.yml
index 656c2a8..6f12c2c 100644
--- a/spec/rtems/basedefs/if/alias.yml
+++ b/spec/rtems/basedefs/if/alias.yml
@@ -7,7 +7,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__alias__(#_target)))
+      __attribute__(( __alias__( #_target ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/aligned.yml b/spec/rtems/basedefs/if/aligned.yml
index 44f3e12..0f43710 100644
--- a/spec/rtems/basedefs/if/aligned.yml
+++ b/spec/rtems/basedefs/if/aligned.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__aligned__(_alignment)))
+      __attribute__(( __aligned__( _alignment ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/alloc-align.yml b/spec/rtems/basedefs/if/alloc-align.yml
index 12f9621..436ef22 100644
--- a/spec/rtems/basedefs/if/alloc-align.yml
+++ b/spec/rtems/basedefs/if/alloc-align.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__alloc_align__(_index)))
+      __attribute__(( __alloc_align__( ${.:/params[0]/name} ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/alloc-size-2.yml b/spec/rtems/basedefs/if/alloc-size-2.yml
index af0954c..681ca18 100644
--- a/spec/rtems/basedefs/if/alloc-size-2.yml
+++ b/spec/rtems/basedefs/if/alloc-size-2.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__alloc_size__(_count_index, _size_index)))
+      __attribute__(( __alloc_size__( ${.:/params[0]/name}, ${.:/params[1]/name} ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/alloc-size.yml b/spec/rtems/basedefs/if/alloc-size.yml
index 85e9eb0..2926d74 100644
--- a/spec/rtems/basedefs/if/alloc-size.yml
+++ b/spec/rtems/basedefs/if/alloc-size.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__alloc_size__(_index)))
+      __attribute__(( __alloc_size__( ${.:/params[0]/name} ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/array-size.yml b/spec/rtems/basedefs/if/array-size.yml
index 991dfc2..547b442 100644
--- a/spec/rtems/basedefs/if/array-size.yml
+++ b/spec/rtems/basedefs/if/array-size.yml
@@ -5,7 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    ( sizeof( _array ) / sizeof( ( _array )[ 0 ] ) )
+    ( sizeof( ${.:/params[0]/name} ) / sizeof( ( ${.:/params[0]/name} )[ 0 ] ) )
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/concat.yml b/spec/rtems/basedefs/if/concat.yml
index d0f7ebd..596d046 100644
--- a/spec/rtems/basedefs/if/concat.yml
+++ b/spec/rtems/basedefs/if/concat.yml
@@ -4,7 +4,7 @@ brief: |
 copyrights:
 - Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
-  default: _x##_y
+  default: ${.:/params[0]/name}##${.:/params[1]/name}
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/const.yml b/spec/rtems/basedefs/if/const.yml
index 88c4a4c..739a8d8 100644
--- a/spec/rtems/basedefs/if/const.yml
+++ b/spec/rtems/basedefs/if/const.yml
@@ -9,7 +9,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__const__))
+      __attribute__(( __const__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/container-of.yml b/spec/rtems/basedefs/if/container-of.yml
index 0636d79..70bafc9 100644
--- a/spec/rtems/basedefs/if/container-of.yml
+++ b/spec/rtems/basedefs/if/container-of.yml
@@ -5,7 +5,7 @@ copyrights:
 - Copyright (C) 2014 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    ( (_type *) ( (${/c/if/uintptr_t:/name}) ( _m ) - ${/c/if/offsetof:/name}( _type, _member_name ) ) )
+    ( (${.:/params[1]/name} *) ( (${/c/if/uintptr_t:/name}) ( ${.:/params[0]/name} ) - ${/c/if/offsetof:/name}( ${.:/params[1]/name}, ${.:/params[2]/name} ) ) )
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/declare-global-symbol.yml b/spec/rtems/basedefs/if/declare-global-symbol.yml
index edd39ff..6eeb509 100644
--- a/spec/rtems/basedefs/if/declare-global-symbol.yml
+++ b/spec/rtems/basedefs/if/declare-global-symbol.yml
@@ -5,7 +5,7 @@ copyrights:
 - Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    extern char _name[]
+    extern char ${.:/params[0]/name}[]
   variants: []
 description: |
   This macro must be placed at file scope.
diff --git a/spec/rtems/basedefs/if/deconst.yml b/spec/rtems/basedefs/if/deconst.yml
index 461bb11..5c98aba 100644
--- a/spec/rtems/basedefs/if/deconst.yml
+++ b/spec/rtems/basedefs/if/deconst.yml
@@ -6,7 +6,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 - Copyright (C) 2014 Paval Pisa
 definition:
-  default: ${dequalify-depthx:/name}(*, _type, _var)
+  default: ${dequalify-depthx:/name}( *, ${.:/params[0]/name}, ${.:/params[1]/name} )
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/define-global-symbol.yml b/spec/rtems/basedefs/if/define-global-symbol.yml
index 33b50e9..cd01c05 100644
--- a/spec/rtems/basedefs/if/define-global-symbol.yml
+++ b/spec/rtems/basedefs/if/define-global-symbol.yml
@@ -8,9 +8,9 @@ definition:
   variants:
   - definition: |
       ${/compiler/if/asm:/name}(
-        "\t.globl " ${xstring:/name}( ${symbol-name:/name}( _name ) )
-        "\n\t.set " ${xstring:/name}( ${symbol-name:/name}( _name ) )
-        ", " ${string:/name}( _value ) "\n"
+        "\t.globl " ${xstring:/name}( ${symbol-name:/name}( ${.:/params[0]/name} ) )
+        "\n\t.set " ${xstring:/name}( ${symbol-name:/name}( ${.:/params[0]/name} ) )
+        ", " ${string:/name}( ${.:/params[1]/name} ) "\n"
       )
     enabled-by:
     - defined(${/compiler/if/user-label-prefix:/name})
diff --git a/spec/rtems/basedefs/if/deprecated.yml b/spec/rtems/basedefs/if/deprecated.yml
index 95c4bd8..c83a63c 100644
--- a/spec/rtems/basedefs/if/deprecated.yml
+++ b/spec/rtems/basedefs/if/deprecated.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__deprecated__))
+      __attribute__(( __deprecated__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/dequalify-depthx.yml b/spec/rtems/basedefs/if/dequalify-depthx.yml
index 4320956..cba1764 100644
--- a/spec/rtems/basedefs/if/dequalify-depthx.yml
+++ b/spec/rtems/basedefs/if/dequalify-depthx.yml
@@ -6,19 +6,20 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 - Copyright (C) 2014 Paval Pisa
 definition:
-  default: ((_type)(${/c/if/uintptr_t:/name})(const volatile void *)(_var))
+  default: |
+    ( (${.:/params[1]/name}) (${/c/if/uintptr_t:/name}) (const volatile void *)( ${.:/params[2]/name} ) )
   variants:
   - definition: |
-      (const_cast<_type>(_var))
+      ( const_cast<${.:/params[1]/name}>( ${.:/params[2]/name} ) )
     enabled-by:
     - defined(${/compiler/if/cplusplus:/name})
   - definition: |
-      ${/compiler/if/builtin-choose-expr:/name}(${/compiler/if/builtin-types-compatible-p:/name}(
-          ${typeof-refx:/name}(_ptr_level, _var),
-          ${typeof-refx:/name}(_ptr_level, _type)
-        ) || ${/compiler/if/builtin-types-compatible-p:/name}(_type, void *),
-      (_type)(_var),
-      ${/score/if/dequalify-types-not-compatible:/name}())
+      ${/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/if/dequalify-types-not-compatible:/name}() )
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/dequalify.yml b/spec/rtems/basedefs/if/dequalify.yml
index 3a9da4d..41d3da9 100644
--- a/spec/rtems/basedefs/if/dequalify.yml
+++ b/spec/rtems/basedefs/if/dequalify.yml
@@ -6,7 +6,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 - Copyright (C) 2014 Paval Pisa
 definition:
-  default: ${dequalify-depthx:/name}(*, _type, _var)
+  default: ${dequalify-depthx:/name}( *, ${.:/params[0]/name}, ${.:/params[1]/name} )
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/devolatile.yml b/spec/rtems/basedefs/if/devolatile.yml
index 8431a4e..714c0ff 100644
--- a/spec/rtems/basedefs/if/devolatile.yml
+++ b/spec/rtems/basedefs/if/devolatile.yml
@@ -6,7 +6,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 - Copyright (C) 2014 Paval Pisa
 definition:
-  default: ${dequalify-depthx:/name}(*, _type, _var)
+  default: ${dequalify-depthx:/name}( *, ${.:/params[0]/name}, ${.:/params[1]/name} )
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/expand.yml b/spec/rtems/basedefs/if/expand.yml
index 5172e48..f0b2fa4 100644
--- a/spec/rtems/basedefs/if/expand.yml
+++ b/spec/rtems/basedefs/if/expand.yml
@@ -4,7 +4,7 @@ brief: |
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
-  default: _token
+  default: ${.:/params[0]/name}
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/have-member-same-type.yml b/spec/rtems/basedefs/if/have-member-same-type.yml
index 24fcdc7..e8ff4bf 100644
--- a/spec/rtems/basedefs/if/have-member-same-type.yml
+++ b/spec/rtems/basedefs/if/have-member-same-type.yml
@@ -9,8 +9,8 @@ definition:
   variants:
   - definition: |
       ${/compiler/if/builtin-types-compatible-p:/name}(
-        ${/compiler/if/typeof:/name}( ( (_t_lhs *) 0 )->_m_lhs ),
-        ${/compiler/if/typeof:/name}( ( (_t_rhs *) 0 )->_m_rhs )
+        ${/compiler/if/typeof:/name}( ( (${.:/params[0]/name} *) 0 )->${.:/params[1]/name} ),
+        ${/compiler/if/typeof:/name}( ( (${.:/params[2]/name} *) 0 )->${.:/params[3]/name} )
       )
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
diff --git a/spec/rtems/basedefs/if/malloclike.yml b/spec/rtems/basedefs/if/malloclike.yml
index dffeab0..078ba42 100644
--- a/spec/rtems/basedefs/if/malloclike.yml
+++ b/spec/rtems/basedefs/if/malloclike.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__malloc__))
+      __attribute__(( __malloc__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/no-inline.yml b/spec/rtems/basedefs/if/no-inline.yml
index 9ec6e88..0cac240 100644
--- a/spec/rtems/basedefs/if/no-inline.yml
+++ b/spec/rtems/basedefs/if/no-inline.yml
@@ -7,7 +7,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__noinline__))
+      __attribute__(( __noinline__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/no-return.yml b/spec/rtems/basedefs/if/no-return.yml
index 9dbed4c..ed12573 100644
--- a/spec/rtems/basedefs/if/no-return.yml
+++ b/spec/rtems/basedefs/if/no-return.yml
@@ -16,7 +16,7 @@ definition:
     enabled-by:
     - ${/compiler/if/stdc-version:/name} >= 201112L
   - definition: |
-      __attribute__((__noreturn__))
+      __attribute__(( __noreturn__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/obfuscate-variable.yml b/spec/rtems/basedefs/if/obfuscate-variable.yml
index 8eea8d0..706fa94 100644
--- a/spec/rtems/basedefs/if/obfuscate-variable.yml
+++ b/spec/rtems/basedefs/if/obfuscate-variable.yml
@@ -6,10 +6,10 @@ copyrights:
 - Copyright (C) 2016, 2018 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    (void) (_var)
+    (void) ( ${.:/params[0]/name} )
   variants:
   - definition: |
-      ${/compiler/if/asm:/name}( "" : "+r" ( _var ) )
+      ${/compiler/if/asm:/name}( "" : "+r" ( ${.:/params[0]/name} ) )
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: |
diff --git a/spec/rtems/basedefs/if/packed.yml b/spec/rtems/basedefs/if/packed.yml
index ff7112a..efa9d4b 100644
--- a/spec/rtems/basedefs/if/packed.yml
+++ b/spec/rtems/basedefs/if/packed.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__packed__))
+      __attribute__(( __packed__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/predict-false.yml b/spec/rtems/basedefs/if/predict-false.yml
index 44af5da..56de432 100644
--- a/spec/rtems/basedefs/if/predict-false.yml
+++ b/spec/rtems/basedefs/if/predict-false.yml
@@ -6,10 +6,10 @@ copyrights:
 - Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    ( _exp )
+    ( ${.:/params[0]/name} )
   variants:
   - definition: |
-      ${/compiler/if/builtin-expect:/name}( ( _exp ), 0 )
+      ${/compiler/if/builtin-expect:/name}( ( ${.:/params[0]/name} ), 0 )
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/predict-true.yml b/spec/rtems/basedefs/if/predict-true.yml
index 4a61a1a..e63e4b1 100644
--- a/spec/rtems/basedefs/if/predict-true.yml
+++ b/spec/rtems/basedefs/if/predict-true.yml
@@ -6,10 +6,10 @@ copyrights:
 - Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    ( _exp )
+    ( ${.:/params[0]/name} )
   variants:
   - definition: |
-      ${/compiler/if/builtin-expect:/name}( ( _exp ), 1 )
+      ${/compiler/if/builtin-expect:/name}( ( ${.:/params[0]/name} ), 1 )
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/printflike.yml b/spec/rtems/basedefs/if/printflike.yml
index 03db80b..753153a 100644
--- a/spec/rtems/basedefs/if/printflike.yml
+++ b/spec/rtems/basedefs/if/printflike.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__format__(__printf__, _format_pos, _ap_pos)))
+      __attribute__(( __format__( __printf__, ${.:/params[0]/name}, ${.:/params[1]/name} ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/pure.yml b/spec/rtems/basedefs/if/pure.yml
index ad4257b..6746936 100644
--- a/spec/rtems/basedefs/if/pure.yml
+++ b/spec/rtems/basedefs/if/pure.yml
@@ -9,7 +9,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__pure__))
+      __attribute__(( __pure__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/return-address.yml b/spec/rtems/basedefs/if/return-address.yml
index 4a5994c..0447de7 100644
--- a/spec/rtems/basedefs/if/return-address.yml
+++ b/spec/rtems/basedefs/if/return-address.yml
@@ -7,7 +7,7 @@ definition:
   default: ${/c/if/null:/name}
   variants:
   - definition: |
-      ${/compiler/if/builtin-return-address:/name}(0)
+      ${/compiler/if/builtin-return-address:/name}( 0 )
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/section.yml b/spec/rtems/basedefs/if/section.yml
index cfe39de..9c84274 100644
--- a/spec/rtems/basedefs/if/section.yml
+++ b/spec/rtems/basedefs/if/section.yml
@@ -7,7 +7,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__section__(_section)))
+      __attribute__(( __section__( ${.:/params[0]/name} ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/static-assert.yml b/spec/rtems/basedefs/if/static-assert.yml
index a66edb7..4ca2d23 100644
--- a/spec/rtems/basedefs/if/static-assert.yml
+++ b/spec/rtems/basedefs/if/static-assert.yml
@@ -5,15 +5,15 @@ copyrights:
 - Copyright (C) 2011, 2020 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    struct rtems_static_assert_ ## _msg
-      { int rtems_static_assert_ ## _msg : (_cond) ? 1 : -1; }
+    struct rtems_static_assert_ ## ${.:/params[1]/name}
+      { int rtems_static_assert_ ## ${.:/params[1]/name} : ( ${.:/params[0]/name} ) ? 1 : -1; }
   variants:
   - definition: |
-      static_assert(_cond, # _msg)
+      static_assert( ${.:/params[0]/name}, # ${.:/params[1]/name} )
     enabled-by:
     - ${/compiler/if/cplusplus:/name} >= 201103L
   - definition: |
-      _Static_assert(_cond, # _msg)
+      _Static_assert( ${.:/params[0]/name}, # ${.:/params[1]/name} )
     enabled-by:
     - ${/compiler/if/stdc-version:/name} >= 201112L
 description: null
diff --git a/spec/rtems/basedefs/if/string.yml b/spec/rtems/basedefs/if/string.yml
index e8f2839..32e1cb4 100644
--- a/spec/rtems/basedefs/if/string.yml
+++ b/spec/rtems/basedefs/if/string.yml
@@ -4,7 +4,7 @@ brief: |
 copyrights:
 - Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
-  default: '#_x'
+  default: '#${.:/params[0]/name}'
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/symbol-name.yml b/spec/rtems/basedefs/if/symbol-name.yml
index 198818b..376fe6b 100644
--- a/spec/rtems/basedefs/if/symbol-name.yml
+++ b/spec/rtems/basedefs/if/symbol-name.yml
@@ -5,10 +5,10 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
   default: |
-    ${expand:/name}(_name)
+    ${expand:/name}( ${.:/params[0]/name} )
   variants:
   - definition: |
-      ${xconcat:/name}(${/compiler/if/user-label-prefix:/name}, _name)
+      ${xconcat:/name}( ${/compiler/if/user-label-prefix:/name}, ${.:/params[0]/name} )
     enabled-by:
     - defined(${/compiler/if/user-label-prefix:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/typeof-refx.yml b/spec/rtems/basedefs/if/typeof-refx.yml
index 36adaf7..1836fd9 100644
--- a/spec/rtems/basedefs/if/typeof-refx.yml
+++ b/spec/rtems/basedefs/if/typeof-refx.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      ${/compiler/if/typeof:/name}( _level( union { int z; ${/compiler/if/typeof:/name}( _target ) x; } ){ 0 }.x )
+      ${/compiler/if/typeof:/name}( ${.:/params[0]/name}( union { int _z; ${/compiler/if/typeof:/name}( ${.:/params[1]/name} ) _x; } ){ 0 }._x )
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: |
diff --git a/spec/rtems/basedefs/if/unused.yml b/spec/rtems/basedefs/if/unused.yml
index 935eaaf..8ec392d 100644
--- a/spec/rtems/basedefs/if/unused.yml
+++ b/spec/rtems/basedefs/if/unused.yml
@@ -7,7 +7,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__unused__))
+      __attribute__(( __unused__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/used.yml b/spec/rtems/basedefs/if/used.yml
index 4168871..e4190ea 100644
--- a/spec/rtems/basedefs/if/used.yml
+++ b/spec/rtems/basedefs/if/used.yml
@@ -7,7 +7,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__used__))
+      __attribute__(( __used__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/warn-unused-result.yml b/spec/rtems/basedefs/if/warn-unused-result.yml
index 871aeb7..5abdbfe 100644
--- a/spec/rtems/basedefs/if/warn-unused-result.yml
+++ b/spec/rtems/basedefs/if/warn-unused-result.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__warn_unused_result__))
+      __attribute__(( __warn_unused_result__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/weak-alias.yml b/spec/rtems/basedefs/if/weak-alias.yml
index 289bbf6..10f6f12 100644
--- a/spec/rtems/basedefs/if/weak-alias.yml
+++ b/spec/rtems/basedefs/if/weak-alias.yml
@@ -7,7 +7,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__weak__, __alias__(#_target)))
+      __attribute__(( __weak__, __alias__( #${.:/params[0]/name} ) ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: null
diff --git a/spec/rtems/basedefs/if/weak.yml b/spec/rtems/basedefs/if/weak.yml
index 3b6ba0d..947998c 100644
--- a/spec/rtems/basedefs/if/weak.yml
+++ b/spec/rtems/basedefs/if/weak.yml
@@ -8,7 +8,7 @@ definition:
   default: ''
   variants:
   - definition: |
-      __attribute__((__weak__))
+      __attribute__(( __weak__ ))
     enabled-by:
     - defined(${/compiler/if/gnuc:/name})
 description: |
diff --git a/spec/rtems/basedefs/if/xconcat.yml b/spec/rtems/basedefs/if/xconcat.yml
index 2b753b0..c6e70b3 100644
--- a/spec/rtems/basedefs/if/xconcat.yml
+++ b/spec/rtems/basedefs/if/xconcat.yml
@@ -4,7 +4,7 @@ brief: |
 copyrights:
 - Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
-  default: ${concat:/name}( _x, _y )
+  default: ${concat:/name}( ${.:/params[0]/name}, ${.:/params[1]/name} )
   variants: []
 description: null
 enabled-by: true
diff --git a/spec/rtems/basedefs/if/xstring.yml b/spec/rtems/basedefs/if/xstring.yml
index 6a335c3..0218a29 100644
--- a/spec/rtems/basedefs/if/xstring.yml
+++ b/spec/rtems/basedefs/if/xstring.yml
@@ -4,7 +4,7 @@ brief: |
 copyrights:
 - Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
 definition:
-  default: ${string:/name}( _x )
+  default: ${string:/name}( ${.:/params[0]/name} )
   variants: []
 description: null
 enabled-by: true



More information about the vc mailing list