blob: dc501b2cb9f04e2d5508f031ff6c11329bf501bf (
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
|
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/weak-alias
rationale: |
The other function at global scope with the same name as
``newname`` can possibly be defined in
another compilation unit and linked with the compilation
unit containing the function defined with ${../if/weak-alias:/name}.
references: []
requirement-type: functional
text: |
When the code is compiled with the GNU C compiler,
and the produced target file format is ELF or a.out,
and argument ${../if/weak-alias:/params[0]/name} is a name of a function,
and the macro ${../if/weak-alias:/name} call is in the same compilation unit
as the function,
and the macro is not used in block scope,
and the macro is used in this form:
``<return-type> newname([argument-type-list]) ${../if/weak-alias:/name}(oldname)``;,
and the ``<return-type>`` and ``argument-type-list`` match the
signature of the function ``oldname``,
and there is another function symbol at global scope with the same name as
``newname``,
and this other function is not defined with the ${../if/weak:/name} macro or
otherwise defined or declared ``weak``,
and both functions have the same type,
the ${../if/weak-alias:/name} macro shall cause the code to behave as if
the function defined with the ${../if/weak-alias:/name} macro does not exist.
type: requirement
|