summaryrefslogtreecommitdiffstats
path: root/spec/rtems/basedefs/req/printflike-1.yml
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rtems/basedefs/req/printflike-1.yml')
-rw-r--r--spec/rtems/basedefs/req/printflike-1.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/rtems/basedefs/req/printflike-1.yml b/spec/rtems/basedefs/req/printflike-1.yml
new file mode 100644
index 00000000..48d3f0b9
--- /dev/null
+++ b/spec/rtems/basedefs/req/printflike-1.yml
@@ -0,0 +1,30 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: ../if/printflike
+non-functional-type: interface
+rationale: |
+ This case is for functions where the arguments are not available
+ to be checked (such as ``vprintf``). The compiler will only check
+ the format string for consistency.
+
+ Counting of arguments starts at 1 from the left with the
+ exception of non-static C++ methods where the counting starts with
+ 2 due to the implicit ``this`` argument.
+references: []
+requirement-type: non-functional
+text: |
+ When the code is compiled with the GNU C compiler,
+ and the ${../if/printflike:/name} macro is used as last part of a
+ function declaration or prefixes a function definition,
+ and ${../if/printflike:/params[0]/name} is a constant number
+ referring to an argument of that function,
+ and the function argument number ${../if/printflike:/params[0]/name}
+ is a ``printf``-format string,
+ and the function argument {../if/printflike:/params[1]/name} is 0,
+ the macro shall cause the compiler to use this information for
+ checking the format string.
+type: requirement